Documentation
¶
Index ¶
- func AppendQuery(raw string, values url.Values) string
- func ConfiguredLoginValue() string
- func ConstantTimeEqual(a, b string) bool
- func EquivalentResourceURI(left, right string) bool
- func IssueToken(issuer, audience, grantID, key string, ttl time.Duration) (string, error)
- func ParseBearerToken(header string) (string, bool)
- func RandomToken(n int) (string, error)
- func ValidPKCEChallenge(challenge string) bool
- func ValidateToken(token, issuer, audience, key string) (string, bool)
- func VerifyPKCE(verifier, challenge string) bool
- type Bearer
- type OAuthClientRegistration
- type OAuthCode
- type OAuthGrant
- type OAuthStore
- func (s *OAuthStore) ActivateGrant(clientID, resource, grantID string, ttl time.Duration) error
- func (s *OAuthStore) ClientAllowsGrant(clientID, grantType string) bool
- func (s *OAuthStore) ClientRegistration(clientID string) (OAuthClientRegistration, bool)
- func (s *OAuthStore) Create(code OAuthCode) (string, error)
- func (s *OAuthStore) GrantActive(grantID string) bool
- func (s *OAuthStore) IssueRefreshToken(clientID, resource, grantID string, ttl time.Duration) (string, error)
- func (s *OAuthStore) PruneExpiredClients(now time.Time) (int, error)
- func (s *OAuthStore) Redeem(raw, clientID, redirectURI, verifier, resource string) (OAuthCode, bool, bool)
- func (s *OAuthStore) RegisterClient(clientName string, redirectURIs, grantTypes []string) (string, error)
- func (s *OAuthStore) RevokeGrant(grantID string, ttl time.Duration) error
- func (s *OAuthStore) RotateRefreshToken(raw, clientID, requestedResource string, ttl time.Duration) (string, string, string, bool, error)
- func (s *OAuthStore) ValidateClientID(clientID string) bool
- func (s *OAuthStore) ValidateClientRedirect(clientID, redirectURI string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfiguredLoginValue ¶
func ConfiguredLoginValue() string
func ConstantTimeEqual ¶
func EquivalentResourceURI ¶
func IssueToken ¶
func ParseBearerToken ¶
func RandomToken ¶
func ValidPKCEChallenge ¶
func ValidateToken ¶
func VerifyPKCE ¶
Types ¶
type OAuthClientRegistration ¶
type OAuthGrant ¶
type OAuthStore ¶
type OAuthStore struct {
// contains filtered or unexported fields
}
func NewOAuthStore ¶
func NewOAuthStore() *OAuthStore
func NewPersistentOAuthStore ¶
func NewPersistentOAuthStore(path, signingKey string) (*OAuthStore, error)
func (*OAuthStore) ActivateGrant ¶
func (s *OAuthStore) ActivateGrant(clientID, resource, grantID string, ttl time.Duration) error
func (*OAuthStore) ClientAllowsGrant ¶
func (s *OAuthStore) ClientAllowsGrant(clientID, grantType string) bool
func (*OAuthStore) ClientRegistration ¶
func (s *OAuthStore) ClientRegistration(clientID string) (OAuthClientRegistration, bool)
func (*OAuthStore) GrantActive ¶
func (s *OAuthStore) GrantActive(grantID string) bool
func (*OAuthStore) IssueRefreshToken ¶
func (*OAuthStore) PruneExpiredClients ¶
func (s *OAuthStore) PruneExpiredClients(now time.Time) (int, error)
func (*OAuthStore) Redeem ¶
func (s *OAuthStore) Redeem(raw, clientID, redirectURI, verifier, resource string) (OAuthCode, bool, bool)
Redeem validates every authorization-code binding while holding the store lock and consumes the code only after all checks succeed.
func (*OAuthStore) RegisterClient ¶
func (s *OAuthStore) RegisterClient(clientName string, redirectURIs, grantTypes []string) (string, error)
func (*OAuthStore) RevokeGrant ¶
func (s *OAuthStore) RevokeGrant(grantID string, ttl time.Duration) error
func (*OAuthStore) RotateRefreshToken ¶
func (*OAuthStore) ValidateClientID ¶
func (s *OAuthStore) ValidateClientID(clientID string) bool
func (*OAuthStore) ValidateClientRedirect ¶
func (s *OAuthStore) ValidateClientRedirect(clientID, redirectURI string) bool
Click to show internal directories.
Click to hide internal directories.