handlers

package
v0.0.0-...-82f6397 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppHandler

func AppHandler() gin.HandlerFunc

AppHandler is the handler for the /app route

func AuthorizeHandler

func AuthorizeHandler() gin.HandlerFunc

AuthorizeHandler is the handler for the /authorize route required params ?redirect_uri = redirect url ?response_mode = to decide if result should be html or re-direct state[recommended] = to prevent CSRF attack (for authorizer its compulsory) code_challenge = to prevent CSRF attack code_challenge_method = to prevent CSRF attack [only sh256 is supported]

func DashboardHandler

func DashboardHandler() gin.HandlerFunc

DashboardHandler is the handler for the /dashboard route

func GraphqlHandler

func GraphqlHandler() gin.HandlerFunc

GraphqlHandler is the main handler that handels all the graphql requests

func HealthHandler

func HealthHandler() gin.HandlerFunc

HealthHandler is the handler for /health route. It states if server is in healthy state or not

func JWKsHandler

func JWKsHandler() gin.HandlerFunc

func LogoutHandler

func LogoutHandler() gin.HandlerFunc

Handler to logout user

func OAuthCallbackHandler

func OAuthCallbackHandler() gin.HandlerFunc

OAuthCallbackHandler handles the OAuth callback for various oauth providers

func OAuthLoginHandler

func OAuthLoginHandler() gin.HandlerFunc

OAuthLoginHandler set host in the oauth state that is useful for redirecting to oauth_callback

func OpenIDConfigurationHandler

func OpenIDConfigurationHandler() gin.HandlerFunc

OpenIDConfigurationHandler handler for open-id configurations

func PlaygroundHandler

func PlaygroundHandler() gin.HandlerFunc

PlaygroundHandler is the handler for the /playground route

func RevokeRefreshTokenHandler

func RevokeRefreshTokenHandler() gin.HandlerFunc

RevokeRefreshTokenHandler handler to revoke refresh token

func RootHandler

func RootHandler() gin.HandlerFunc

RootHandler is the handler for / root route.

func TokenHandler

func TokenHandler() gin.HandlerFunc

TokenHandler to handle /oauth/token requests grant type required

func UserInfoHandler

func UserInfoHandler() gin.HandlerFunc

func VerifyEmailHandler

func VerifyEmailHandler() gin.HandlerFunc

VerifyEmailHandler handles the verify email route. It verifies email based on JWT token in query string

Types

type RequestBody

type RequestBody struct {
	CodeVerifier string `form:"code_verifier" json:"code_verifier"`
	Code         string `form:"code" json:"code"`
	ClientID     string `form:"client_id" json:"client_id"`
	ClientSecret string `form:"client_secret" json:"client_secret"`
	GrantType    string `form:"grant_type" json:"grant_type"`
	RefreshToken string `form:"refresh_token" json:"refresh_token"`
	RedirectURI  string `form:"redirect_uri" json:"redirect_uri"`
}

type State

type State struct {
	AuthorizerURL string `json:"authorizerURL"`
	RedirectURL   string `json:"redirectURL"`
}

State is the struct that holds authorizer url and redirect url They are provided via query string in the request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL