Documentation
¶
Index ¶
- type AuthError
- type Verifier
- func (o *Verifier) Auth(ctx context.Context, w http.ResponseWriter, r *http.Request) (string, map[string]any, 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) 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, map[string]any, error)
Auth extracts the token, validates it and returns the user name and validated claims.
func (*Verifier) Callback ¶
func (o *Verifier) Callback(w http.ResponseWriter, r *http.Request)
Callback handles the redirect back from the OIDC provider and completes the login flow.
func (*Verifier) Login ¶
func (o *Verifier) Login(w http.ResponseWriter, r *http.Request)
Login starts the OIDC login flow by redirecting the client to the provider's authorization endpoint.
func (*Verifier) Logout ¶
func (o *Verifier) Logout(w http.ResponseWriter, r *http.Request)
Logout ends the OIDC session and clears the authentication cookies.
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.