Documentation ¶
Index ¶
- Constants
- Variables
- type AdminServer
- type InvitationHandler
- type JWTVerifierFactory
- type Link
- type MultiServerConfig
- type OIDCServer
- type ResetPasswordHandler
- type SendResetPasswordEmailHandler
- type Server
- func (s *Server) AddConnector(cfg connector.ConnectorConfig) error
- func (s *Server) ClientCredsToken(creds oidc.ClientCredentials) (*jose.JWT, error)
- func (s *Server) ClientMetadata(clientID string) (*oidc.ClientMetadata, error)
- func (s *Server) CodeToken(creds oidc.ClientCredentials, sessionKey string) (*jose.JWT, string, error)
- func (s *Server) HTTPHandler() http.Handler
- func (s *Server) JWTVerifierFactory() JWTVerifierFactory
- func (s *Server) KillSession(sessionKey string) error
- func (s *Server) Login(ident oidc.Identity, key string) (string, error)
- func (s *Server) NewClientTokenAuthHandler(handler http.Handler) http.Handler
- func (s *Server) NewSession(ipdcID, clientID, clientState string, redirectURL url.URL, nonce string, ...) (string, error)
- func (s *Server) ProviderConfig() oidc.ProviderConfig
- func (s *Server) RefreshToken(creds oidc.ClientCredentials, token string) (*jose.JWT, error)
- func (s *Server) Run() chan struct{}
- type ServerConfig
- type SingleServerConfig
- type StateConfigurer
- type Template
- type UserMgmtServer
Constants ¶
View Source
const ( AdminAPIVersion = "v1" AdminAPISecretLength = 128 )
View Source
const ( LoginPageTemplateName = "login.html" RegisterTemplateName = "register.html" VerifyEmailTemplateName = "verify-email.html" SendResetPasswordEmailTemplateName = "send-reset-password.html" ResetPasswordTemplateName = "reset-password.html" APIVersion = "v1" )
Variables ¶
View Source
var ( AdminGetEndpoint = addBasePath("/admin/:id") AdminCreateEndpoint = addBasePath("/admin") AdminGetStateEndpoint = addBasePath("/state") )
View Source
var ( UsersSubTree = "/users" UsersListEndpoint = addBasePath(UsersSubTree) UsersCreateEndpoint = addBasePath(UsersSubTree) UsersGetEndpoint = addBasePath(UsersSubTree + "/:id") UsersDisableEndpoint = addBasePath(UsersSubTree + "/:id/disable") UsersResendInvitationEndpoint = addBasePath(UsersSubTree + "/:id/resend-invitation") )
Functions ¶
This section is empty.
Types ¶
type AdminServer ¶
type AdminServer struct {
// contains filtered or unexported fields
}
AdminServer serves the admin API.
func NewAdminServer ¶
func NewAdminServer(adminAPI *admin.AdminAPI, rotator *key.PrivateKeyRotator, secret string) *AdminServer
func (*AdminServer) HTTPHandler ¶
func (s *AdminServer) HTTPHandler() http.Handler
type InvitationHandler ¶ added in v0.2.0
type InvitationHandler struct {
// contains filtered or unexported fields
}
func (*InvitationHandler) ServeHTTP ¶ added in v0.2.0
func (h *InvitationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type JWTVerifierFactory ¶
type JWTVerifierFactory func(clientID string) oidc.JWTVerifier
type MultiServerConfig ¶
func (*MultiServerConfig) Configure ¶
func (cfg *MultiServerConfig) Configure(srv *Server) error
type OIDCServer ¶
type OIDCServer interface { ClientMetadata(string) (*oidc.ClientMetadata, error) NewSession(connectorID, clientID, clientState string, redirectURL url.URL, nonce string, register bool, scope []string) (string, error) Login(oidc.Identity, string) (string, error) // CodeToken exchanges a code for an ID token and a refresh token string on success. CodeToken(creds oidc.ClientCredentials, sessionKey string) (*jose.JWT, string, error) ClientCredsToken(creds oidc.ClientCredentials) (*jose.JWT, error) // RefreshToken takes a previously generated refresh token and returns a new ID token // if the token is valid. RefreshToken(creds oidc.ClientCredentials, token string) (*jose.JWT, error) KillSession(string) error }
type ResetPasswordHandler ¶
type ResetPasswordHandler struct {
// contains filtered or unexported fields
}
func (*ResetPasswordHandler) ServeHTTP ¶
func (h *ResetPasswordHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type SendResetPasswordEmailHandler ¶
type SendResetPasswordEmailHandler struct {
// contains filtered or unexported fields
}
func (*SendResetPasswordEmailHandler) ServeHTTP ¶
func (h *SendResetPasswordEmailHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Server ¶
type Server struct { IssuerURL url.URL KeyManager key.PrivateKeyManager KeySetRepo key.PrivateKeySetRepo SessionManager *sessionmanager.SessionManager ClientIdentityRepo client.ClientIdentityRepo ConnectorConfigRepo connector.ConnectorConfigRepo Templates *template.Template LoginTemplate *template.Template RegisterTemplate *template.Template VerifyEmailTemplate *template.Template SendResetPasswordEmailTemplate *template.Template ResetPasswordTemplate *template.Template HealthChecks []health.Checkable Connectors []connector.Connector UserRepo user.UserRepo UserManager *usermanager.UserManager PasswordInfoRepo user.PasswordInfoRepo RefreshTokenRepo refresh.RefreshTokenRepo UserEmailer *useremail.UserEmailer EnableRegistration bool EnableClientRegistration bool // contains filtered or unexported fields }
func (*Server) AddConnector ¶
func (s *Server) AddConnector(cfg connector.ConnectorConfig) error
func (*Server) ClientCredsToken ¶
func (*Server) ClientMetadata ¶
func (s *Server) ClientMetadata(clientID string) (*oidc.ClientMetadata, error)
func (*Server) HTTPHandler ¶
func (*Server) JWTVerifierFactory ¶
func (s *Server) JWTVerifierFactory() JWTVerifierFactory
func (*Server) KillSession ¶
func (*Server) NewClientTokenAuthHandler ¶
NewClientTokenAuthHandler returns the given handler wrapped in middleware which requires a Client Bearer token.
func (*Server) NewSession ¶
func (*Server) ProviderConfig ¶
func (s *Server) ProviderConfig() oidc.ProviderConfig
func (*Server) RefreshToken ¶
type ServerConfig ¶
type ServerConfig struct { IssuerURL string IssuerName string IssuerLogoURL string TemplateDir string EmailTemplateDirs []string EmailFromAddress string EmailerConfigFile string StateConfig StateConfigurer EnableRegistration bool EnableClientRegistration bool }
func (*ServerConfig) Server ¶
func (cfg *ServerConfig) Server() (*Server, error)
type SingleServerConfig ¶
func (*SingleServerConfig) Configure ¶
func (cfg *SingleServerConfig) Configure(srv *Server) error
type StateConfigurer ¶
type UserMgmtServer ¶
type UserMgmtServer struct {
// contains filtered or unexported fields
}
func NewUserMgmtServer ¶
func NewUserMgmtServer(userMgmtAPI *api.UsersAPI, jwtvFactory JWTVerifierFactory, um *manager.UserManager, cir client.ClientIdentityRepo) *UserMgmtServer
func (*UserMgmtServer) HTTPHandler ¶
func (s *UserMgmtServer) HTTPHandler() http.Handler
Click to show internal directories.
Click to hide internal directories.