Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppleUserInfo ¶
type AppleUserInfo struct {
Email string `json:"email"`
Name struct {
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
} `json:"name"`
}
AppleUserInfo is the struct for apple user info
type Dependencies ¶
type Dependencies struct {
Log *zerolog.Logger
// Providers for various services
// AuditProvider is used to log audit events
AuditProvider audit.Provider
// AuthenticatorProvider is used to register authenticators like totp (Google Authenticator)
AuthenticatorProvider authenticators.Provider
// EmailProvider is used to send emails
EmailProvider email.Provider
// EventsProvider is used to register events
EventsProvider events.Provider
// MemoryStoreProvider is used to store data in memory
MemoryStoreProvider memory_store.Provider
// SMSProvider is used to send SMS
SMSProvider sms.Provider
// StorageProvider is used to register storage like database
StorageProvider storage.Provider
// TokenProvider is used to generate tokens
TokenProvider token.Provider
// OAuthProvider is used to register oauth providers
OAuthProvider oauth.Provider
// RateLimitProvider is used for per-IP rate limiting
RateLimitProvider rate_limit.Provider
}
Dependencies for a graphql provider
type Provider ¶
type Provider interface {
// AppHandler is the main handler that handels all the app requests
AppHandler() gin.HandlerFunc
// AuthorizeHandler is the main handler that handels all the authorize requests
AuthorizeHandler() gin.HandlerFunc
// DashboardHandler is the main handler that handels all the dashboard requests
DashboardHandler() gin.HandlerFunc
// GraphqlHandler is the main handler that handels all the graphql requests
GraphqlHandler() gin.HandlerFunc
// HealthHandler is the handler for the /healthz liveness probe
HealthHandler() gin.HandlerFunc
// ReadyHandler is the handler for the /readyz readiness probe
ReadyHandler() gin.HandlerFunc
// IntrospectHandler is the main handler for RFC 7662 Token Introspection
IntrospectHandler() gin.HandlerFunc
// JWKsHandler is the main handler that handels all the jwks requests
JWKsHandler() gin.HandlerFunc
// LogoutHandler is the main handler that handels all the logout requests
LogoutHandler() gin.HandlerFunc
// OAuthCallbackHandler is the main handler that handels all the oauth callback requests
OAuthCallbackHandler() gin.HandlerFunc
// OAuthLoginHandler is the main handler that handels all the oauth login requests
OAuthLoginHandler() gin.HandlerFunc
// OpenIDConfigurationHandler is the main handler that handels all the openid configuration requests
OpenIDConfigurationHandler() gin.HandlerFunc
// PlaygroundHandler is the main handler that handels all the playground requests
PlaygroundHandler() gin.HandlerFunc
// RevokeRefreshTokenHandler is the main handler that handels all the revoke refresh token requests
RevokeRefreshTokenHandler() gin.HandlerFunc
// RootHandler is the main handler that handels all the root requests
RootHandler() gin.HandlerFunc
// TokenHandler is the main handler that handels all the token requests
TokenHandler() gin.HandlerFunc
// UserInfoHandler is the main handler that handels all the user info requests
UserInfoHandler() gin.HandlerFunc
// VerifyEmailHandler is the main handler that handels all the verify email requests
VerifyEmailHandler() gin.HandlerFunc
// ClientCheckMiddleware is the middleware that checks if the client is valid
ClientCheckMiddleware() gin.HandlerFunc
// ContextMiddleware is the middleware that adds the context to the request
ContextMiddleware() gin.HandlerFunc
// CORSMiddleware is the middleware that adds the cors headers to the response
CORSMiddleware() gin.HandlerFunc
// CSRFMiddleware protects against CSRF on state-changing requests
CSRFMiddleware() gin.HandlerFunc
// LoggerMiddleware is the middleware that logs the request
LoggerMiddleware() gin.HandlerFunc
// RateLimitMiddleware is the middleware that rate limits requests per IP
RateLimitMiddleware() gin.HandlerFunc
// MetricsMiddleware records HTTP request count and duration for prometheus.
MetricsMiddleware() gin.HandlerFunc
// MetricsHandler serves the Prometheus metrics scrape endpoint.
MetricsHandler() gin.HandlerFunc
// SecurityHeadersMiddleware sets standard security headers on every response.
SecurityHeadersMiddleware() gin.HandlerFunc
}
Provider is the interface that provides the methods to interact with the http handlers.
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"`
}
Source Files
¶
- app.go
- authorize.go
- client_check.go
- context.go
- cors.go
- csrf.go
- dashboard.go
- graphql.go
- health.go
- introspect.go
- jwks.go
- logger.go
- logout.go
- metrics.go
- oauth_authorize_state.go
- oauth_callback.go
- oauth_login.go
- openid_config.go
- playground.go
- provider.go
- rate_limit.go
- revoke_refresh_token.go
- root.go
- security_headers.go
- token.go
- userinfo.go
- verify_email.go
Click to show internal directories.
Click to hide internal directories.