Versions in this module Expand all Collapse all v0 v0.0.1 Feb 13, 2023 Changes in this version + const TokenTypeBearer + const TokenTypeJWT + func ParseMatchURL(baseURL, redirectURL string) (retBaseURL, retRedirectURL *url.URL, err error) + func ValidateClientSecret(client protocol.Client, secret string) bool + func ValidateCodeChallenge(codeChall string, codeChallMethod protocol.CodeChallengeMethod) (protocol.CodeChallengeMethod, bool) + func ValidateGrantType(types []protocol.GrantType, ty protocol.GrantType) bool + func ValidateIDTokenHint(idTokenHit string) (string, error) + func ValidateOfflineAccess(prompt []string, scopes []string) ([]string, bool, error) + func ValidatePrompt(prompts []string, maxAge int) (int, error) + func ValidateScopes(cli protocol.Client, scopes []string, defaultScopes []string, ...) ([]string, bool, bool) + func ValidateTokenHint(hint protocol.TokenTypeHint) bool + func ValidateURI(baseURI, redirectURI string) (realRedirectURI string, err error) + func ValidateURIList(baseURIList, redirectURI, separator string) (realRedirectURI string, err error) + type BasicAuth struct + Password string + Username string + type Option func(opts *Options) + func WithAllowClientSecretInParams(allow bool) Option + func WithAllowGetAccessRequest(allow bool) Option + func WithDefaultScopes(scopes []protocol.Scope) Option + func WithForcePKCEForPublicClients(force bool) Option + func WithRedirectURISeparator(s string) Option + func WithRetainTokenAfterRefresh(s bool) Option + func WithSession(sess protocol.Session) Option + func WithStorage(storage protocol.Storage) Option + func WithSupportedRequestObject(s bool) Option + func WithTokenType(ty TokenType) Option + type Options struct + AllowClientSecretInParams bool + AllowGetAccessRequest bool + DefaultScopes []protocol.Scope + ForcePKCEForPublicClients bool + RedirectURISeparator string + RetainTokenAfrerRefresh bool + Session protocol.Session + Storage protocol.Storage + SupportedRequestObject bool + TokenType TokenType + type ResponseTypeOK struct + ResponseTypeCode bool + ResponseTypeDevice bool + ResponseTypeIDToken bool + ResponseTypeNone bool + ResponseTypeToken bool + func ValidateResponseType(cli protocol.Client, reqTypes []string) (ResponseTypeOK, error) + type Server struct + func NewServer(options ...Option) *Server + func (s *Server) FinishAuthorizeRequest(resp *protocol.Response, r *http.Request, req *protocol.AuthorizeRequest) + func (s *Server) FinishCheckSessionRequest(resp *protocol.Response, w http.ResponseWriter, ...) + func (s *Server) FinishEndSessionRequest(resp *protocol.Response, r *http.Request, req *protocol.EndSessionRequest) + func (s *Server) FinishRevocationRequest(resp *protocol.Response, r *http.Request, req *protocol.RevocationRequest) + func (s *Server) FinishTokenRequest(resp *protocol.Response, r *http.Request, req *protocol.AccessRequest) + func (s *Server) FinishUserInfoRequest(resp *protocol.Response, r *http.Request, req *protocol.UserInfoRequest) + func (s *Server) GenerateAccessTokenAndSave(req *protocol.AccessData, genRefresh bool) (token, refresh string, err error) + func (s *Server) GenerateAuthorizeCodeAndSave(req *protocol.AuthorizeData) (code string, err error) + func (s *Server) HandleAuthorizeRequest(resp *protocol.Response, r *http.Request, issuer string) *protocol.AuthorizeRequest + func (s *Server) HandleCheckSessionEndpoint(resp *protocol.Response, r *http.Request, issuer string) *protocol.CheckSessionRequest + func (s *Server) HandleEndSessionEndpoint(resp *protocol.Response, r *http.Request, issuer string) *protocol.EndSessionRequest + func (s *Server) HandleRevocationRequest(resp *protocol.Response, r *http.Request, issuer string) *protocol.RevocationRequest + func (s *Server) HandleTokenRequest(resp *protocol.Response, r *http.Request, issuer string) *protocol.AccessRequest + func (s *Server) HandleUserInfoRequest(resp *protocol.Response, r *http.Request, issuer string) *protocol.UserInfoRequest + type TokenType string + type URIValidationError string + func (e URIValidationError) Error() string