Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntrospectResponse ¶
type IntrospectResponse struct { Active bool `json:"active"` Audience string `json:"aud,omitempty"` ClientID string `json:"client_id,omitempty"` Expiration int `json:"exp,omitempty"` IssuedAt int `json:"iat,omitempty"` Issuer string `json:"iss,omitempty"` JWTID string `json:"jti,omitempty"` NotBefore int `json:"nbf,omitempty"` Scope string `json:"scope,omitempty"` Subject string `json:"sub,omitempty"` TokenType string `json:"token_type,omitempty"` Username string `json:"username,omitempty"` }
IntrospectResponse is defined in RFC-7662: https://datatracker.ietf.org/doc/html/rfc7662
func (IntrospectResponse) Clone ¶ added in v0.21.8
func (ir IntrospectResponse) Clone() IntrospectResponse
type MockServer ¶
type MockServer struct { Response IntrospectResponse ActiveTokens map[string]int }
MockServer is a mock server that implements RFC-7662 OAuth 2.0 Introspection API endpoint for testing purposes.
func NewMockServer ¶
func NewMockServer(r IntrospectResponse, activeTokens []string) MockServer
func (MockServer) ListenAndServe ¶
func (ms MockServer) ListenAndServe(addr string) error
func (MockServer) NewServeMux ¶
func (ms MockServer) NewServeMux() *http.ServeMux
func (MockServer) PostIntrospect ¶
func (ms MockServer) PostIntrospect(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.