Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
This section is empty.
Types ¶
type ConsentReqDoer ¶
type ConsentReqDoer struct {
// contains filtered or unexported fields
}
ConsentReqDoer fetches information on the OAuth2 request and then accept or reject the requested authentication process.
func NewConsentReqDoer ¶
func NewConsentReqDoer(hydraURL string, rememberFor int) *ConsentReqDoer
NewConsentReqDoer creates a ConsentRequest.
func (*ConsentReqDoer) AcceptConsentRequest ¶
func (crd *ConsentReqDoer) AcceptConsentRequest(challenge string, remember bool, grantScope []string, idToken interface{}) (string, error)
AcceptConsentRequest accepts the requested authentication process, and returns redirect URI.
func (*ConsentReqDoer) InitiateRequest ¶
func (crd *ConsentReqDoer) InitiateRequest(challenge string) (*ReqInfo, error)
InitiateRequest fetches information on the OAuth2 request.
type LoginReqDoer ¶
type LoginReqDoer struct {
// contains filtered or unexported fields
}
LoginReqDoer fetches information on the OAuth2 request and then accept or reject the requested authentication process.
func NewLoginReqDoer ¶
func NewLoginReqDoer(hydraURL string, rememberFor int) *LoginReqDoer
NewLoginReqDoer creates a LoginRequest.
func (*LoginReqDoer) AcceptLoginRequest ¶
func (lrd *LoginReqDoer) AcceptLoginRequest(challenge string, remember bool, subject string) (string, error)
AcceptLoginRequest accepts the requested authentication process, and returns redirect URI.
func (*LoginReqDoer) InitiateRequest ¶
func (lrd *LoginReqDoer) InitiateRequest(challenge string) (*ReqInfo, error)
InitiateRequest fetches information on the OAuth2 request.
type LogoutReqDoer ¶
type LogoutReqDoer struct {
// contains filtered or unexported fields
}
LogoutReqDoer fetches information on the OAuth2 request and then accepts or rejects the requested logout process.
func NewLogoutReqDoer ¶
func NewLogoutReqDoer(hydraURL string) *LogoutReqDoer
NewLogoutReqDoer creates a LogoutRequest.
func (*LogoutReqDoer) AcceptLogoutRequest ¶
func (lrd *LogoutReqDoer) AcceptLogoutRequest(challenge string) (string, error)
AcceptLogoutRequest accepts the requested logout process, and returns redirect URI.
func (*LogoutReqDoer) InitiateRequest ¶
func (lrd *LogoutReqDoer) InitiateRequest(challenge string) (*ReqInfo, error)
InitiateRequest fetches information on the OAuth2 request.