func (c *LoginController) Linksession(ctx *app.LinksessionLoginContext) error {
	brokerEndpoint, err := c.configuration.GetKeycloakEndpointBroker(ctx.RequestData)
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"err": err,
		}, "Unable to get Keycloak broker endpoint URL")
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError("unable to get Keycloak broker endpoint URL "+err.Error()))
	}
	clientID := c.configuration.GetKeycloakClientID()
	whitelist, err := c.configuration.GetValidRedirectURLs(ctx.RequestData)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError(err.Error()))
	}

	return c.auth.LinkSession(ctx, brokerEndpoint, clientID, whitelist)
}
// Linksession links identity provider(s) to the user's account
Linksession links identity provider(s) to the user's account
// Linksession links identity provider ( s ) to the user ' s account
func (c *LoginController) Linksession(ctx *app.LinksessionLoginContext) error {
	brokerEndpoint, err := c.configuration.GetKeycloakEndpointBroker(ctx.RequestData)
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"err": err,
		}, "Unable to get Keycloak broker endpoint URL")
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError("unable to get Keycloak broker endpoint URL "+err.Error()))
	}
	clientID := c.configuration.GetKeycloakClientID()
	whitelist, err := c.configuration.GetValidRedirectURLs(ctx.RequestData)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError(err.Error()))
	}
	return c.auth.LinkSession(ctx, brokerEndpoint, clientID, whitelist)
}
func ( c * LoginController ) Linksession ( ctx * app . LinksessionLoginContext ) error { brokerEndpoint , err := c . configuration . GetKeycloakEndpointBroker ( ctx . RequestData ) if err != nil { log . Error ( ctx , map [ string ] interface { } { " " : err , } , " " ) return jsonapi . JSONErrorResponse ( ctx , errors . NewInternalError ( " " + err . Error ( ) ) ) } clientID := c . configuration . GetKeycloakClientID ( ) whitelist , err := c . configuration . GetValidRedirectURLs ( ctx . RequestData ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , errors . NewInternalError ( err . Error ( ) ) ) } return c . auth . LinkSession ( ctx , brokerEndpoint , clientID , whitelist ) }
Linksession links identity provider(s) to the user's account
Linksession links identity provider ( s ) to the user ' s account