Documentation ¶
Index ¶
- type AuthError
- type Verifier
- func (o *Verifier) Auth(ctx context.Context, w http.ResponseWriter, r *http.Request) (string, error)
- func (o *Verifier) Callback(w http.ResponseWriter, r *http.Request)
- func (o *Verifier) IsRequest(r *http.Request) bool
- func (o *Verifier) Login(w http.ResponseWriter, r *http.Request)
- func (o *Verifier) Logout(w http.ResponseWriter, r *http.Request)
- func (o *Verifier) VerifyAccessToken(ctx context.Context, token string) (*oidc.AccessTokenClaims, error)
- func (o *Verifier) WriteHeaders(w http.ResponseWriter) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier holds all information needed to verify an access token offline.
func NewVerifier ¶
func NewVerifier(issuer string, clientid string, scope string, audience string, claim string) (*Verifier, error)
NewVerifier returns a Verifier.
func (*Verifier) Auth ¶
func (o *Verifier) Auth(ctx context.Context, w http.ResponseWriter, r *http.Request) (string, error)
Auth extracts the token, validates it and returns the user information.
func (*Verifier) VerifyAccessToken ¶
func (o *Verifier) VerifyAccessToken(ctx context.Context, token string) (*oidc.AccessTokenClaims, error)
VerifyAccessToken is a wrapper around op.VerifyAccessToken which avoids having to deal with Go generics elsewhere. It validates the access token (issuer, signature and expiration).
func (*Verifier) WriteHeaders ¶
func (o *Verifier) WriteHeaders(w http.ResponseWriter) error
WriteHeaders writes the OIDC configuration as HTTP headers so the client can initatiate the device code flow.
Click to show internal directories.
Click to hide internal directories.