func (c *LoginController) Authorize(ctx *app.AuthorizeLoginContext) error {
	authEndpoint, err := c.configuration.GetKeycloakEndpointAuth(ctx.RequestData)
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"err": err,
		}, "Unable to get Keycloak auth endpoint URL")
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError("unable to get Keycloak auth endpoint URL. "+err.Error()))
	}

	tokenEndpoint, err := c.configuration.GetKeycloakEndpointToken(ctx.RequestData)
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"err": err,
		}, "Unable to get Keycloak token endpoint URL")
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError("unable to get Keycloak token endpoint URL. "+err.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()))
	}
	whitelist, err := c.configuration.GetValidRedirectURLs(ctx.RequestData)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError(err.Error()))
	}

	return c.auth.Perform(ctx, authEndpoint, tokenEndpoint, brokerEndpoint, whitelist)
}
// Authorize runs the authorize action.
Authorize runs the authorize action.
// Authorize runs the authorize action .
func (c *LoginController) Authorize(ctx *app.AuthorizeLoginContext) error {
	authEndpoint, err := c.configuration.GetKeycloakEndpointAuth(ctx.RequestData)
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"err": err,
		}, "Unable to get Keycloak auth endpoint URL")
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError("unable to get Keycloak auth endpoint URL. "+err.Error()))
	}
	tokenEndpoint, err := c.configuration.GetKeycloakEndpointToken(ctx.RequestData)
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"err": err,
		}, "Unable to get Keycloak token endpoint URL")
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError("unable to get Keycloak token endpoint URL. "+err.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()))
	}
	whitelist, err := c.configuration.GetValidRedirectURLs(ctx.RequestData)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError(err.Error()))
	}
	return c.auth.Perform(ctx, authEndpoint, tokenEndpoint, brokerEndpoint, whitelist)
}
func ( c * LoginController ) Authorize ( ctx * app . AuthorizeLoginContext ) error { authEndpoint , err := c . configuration . GetKeycloakEndpointAuth ( ctx . RequestData ) if err != nil { log . Error ( ctx , map [ string ] interface { } { " " : err , } , " " ) return jsonapi . JSONErrorResponse ( ctx , errors . NewInternalError ( " " + err . Error ( ) ) ) } tokenEndpoint , err := c . configuration . GetKeycloakEndpointToken ( ctx . RequestData ) if err != nil { log . Error ( ctx , map [ string ] interface { } { " " : err , } , " " ) return jsonapi . JSONErrorResponse ( ctx , errors . NewInternalError ( " " + err . 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 ( ) ) ) } whitelist , err := c . configuration . GetValidRedirectURLs ( ctx . RequestData ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , errors . NewInternalError ( err . Error ( ) ) ) } return c . auth . Perform ( ctx , authEndpoint , tokenEndpoint , brokerEndpoint , whitelist ) }
Authorize runs the authorize action.
Authorize runs the authorize action .