func (keycloak *KeycloakOAuthProvider) Link(ctx *app.LinkLoginContext, brokerEndpoint string, clientID string, validRedirectURL string) error {
	token := goajwt.ContextJWT(ctx)
	claims := token.Claims.(jwt.MapClaims)
	sessionState := claims["session_state"]
	clientSession := claims["client_session"]
	if sessionState == nil || clientSession == nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrInternal("Session state or client session are missing in token"))
	}
	ss := sessionState.(*string)
	cs := clientSession.(*string)
	return keycloak.linkAccountToProviders(ctx, ctx.RequestData, ctx.ResponseData, ctx.Redirect, ctx.Provider, *ss, *cs, brokerEndpoint, clientID, validRedirectURL)
}
// Link links identity provider(s) to the user's account using user's access token
Link links identity provider(s) to the user's account using user's access token
// Link links identity provider ( s ) to the user ' s account using user ' s access token
func (keycloak *KeycloakOAuthProvider) Link(ctx *app.LinkLoginContext, brokerEndpoint string, clientID string, validRedirectURL string) error {
	token := goajwt.ContextJWT(ctx)
	claims := token.Claims.(jwt.MapClaims)
	sessionState := claims["session_state"]
	clientSession := claims["client_session"]
	if sessionState == nil || clientSession == nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrInternal("Session state or client session are missing in token"))
	}
	ss := sessionState.(*string)
	cs := clientSession.(*string)
	return keycloak.linkAccountToProviders(ctx, ctx.RequestData, ctx.ResponseData, ctx.Redirect, ctx.Provider, *ss, *cs, brokerEndpoint, clientID, validRedirectURL)
}
func ( keycloak * KeycloakOAuthProvider ) Link ( ctx * app . LinkLoginContext , brokerEndpoint string , clientID string , validRedirectURL string ) error { token := goajwt . ContextJWT ( ctx ) claims := token . Claims . ( jwt . MapClaims ) sessionState := claims [ " " ] clientSession := claims [ " " ] if sessionState == nil || clientSession == nil { return jsonapi . JSONErrorResponse ( ctx , goa . ErrInternal ( " " ) ) } ss := sessionState . ( * string ) cs := clientSession . ( * string ) return keycloak . linkAccountToProviders ( ctx , ctx . RequestData , ctx . ResponseData , ctx . Redirect , ctx . Provider , * ss , * cs , brokerEndpoint , clientID , validRedirectURL ) }
Link links identity provider(s) to the user's account using user's access token
Link links identity provider ( s ) to the user ' s account using user ' s access token