Documentation
¶
Index ¶
- Constants
- Variables
- func AcceptConsentRequest(ctx context.Context, cfg *Config, challenge string, remember bool, ...) (string, error)
- func AcceptLoginRequest(ctx context.Context, cfg *Config, remember bool, subject, challenge string) (string, error)
- func GenericError(ctx context.Context, body io.ReadCloser) error
- type Claim
- type ClientInfo
- type Config
- type HttpClient
- type HttpClientInterface
- type HydraResp
Constants ¶
View Source
const ( LOGIN_REQ reqType = "login" CONSENT_REQ reqType = "consent" )
View Source
const ( ACCEPT_VERB reqVerb = "/accept" GET_VERB reqVerb = "" )
Variables ¶
View Source
var ( // ErrChallengeMissed is an error that happens when a challenge is missed. ErrChallengeMissed = errors.New("challenge missed") // ErrUnauthenticated is an error that happens when authentication is failed. ErrUnauthenticated = errors.New("unauthenticated") // ErrChallengeNotFound is an error that happens when an unknown challenge is used. ErrChallengeNotFound = errors.New("challenge not found") // ErrChallengeExpired is an error that happens when a challenge is already used. ErrChallengeExpired = errors.New("challenge expired") )
Functions ¶
func AcceptConsentRequest ¶
func AcceptLoginRequest ¶
func GenericError ¶
func GenericError(ctx context.Context, body io.ReadCloser) error
Types ¶
type ClientInfo ¶
type HttpClient ¶
func (*HttpClient) GetContext ¶
func (client *HttpClient) GetContext() context.Context
type HttpClientInterface ¶
type HydraResp ¶
type HydraResp struct { Challenge string `json:"challenge"` RequestedScopes []string `json:"requested_scope"` Skip bool `json:"skip"` Subject string `json:"subject"` Client ClientInfo `json:"client"` }
HydraResp contains response from Hydra
func GetConsentRequest ¶
Click to show internal directories.
Click to hide internal directories.