Documentation ¶
Index ¶
- type AcceptConsentRequestPayload
- type AcceptLoginRequestPayload
- type Api
- type DefaultHydraHelper
- func (dhh *DefaultHydraHelper) AcceptConsentRequest(challenge string, payload AcceptConsentRequestPayload) map[string]interface{}
- func (dhh *DefaultHydraHelper) AcceptLoginRequest(challenge string, payload AcceptLoginRequestPayload) map[string]interface{}
- func (dhh *DefaultHydraHelper) GetConsentRequestInfo(challenge string) map[string]interface{}
- func (dhh *DefaultHydraHelper) GetLoginRequestInfo(challenge string) map[string]interface{}
- func (dhh *DefaultHydraHelper) Init(adminURL string) Api
- func (dhh *DefaultHydraHelper) RejectConsentRequest(challenge string, payload RejectConsentRequestPayload) map[string]interface{}
- type RejectConsentRequestPayload
- type TokenSessionPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptConsentRequestPayload ¶
type AcceptConsentRequestPayload struct { GrantScope []string `json:"grant_scope"` GrantAccessTokenAudience []string `json:"grant_access_token_audience"` Remember bool `json:"remember"` RememberFor int `json:"remember_for"` Session TokenSessionPayload `json:"session"` }
AcceptConsentRequestPayload holds the data to communicate with hydra's accept consent api
type AcceptLoginRequestPayload ¶
type AcceptLoginRequestPayload struct { Subject string `json:"subject"` Remember bool `json:"remember"` RememberFor int `json:"remember_for"` ACR string `json:"acr"` }
AcceptLoginRequestPayload holds the data to communicate with hydra's accept login api
type Api ¶
type Api interface { GetLoginRequestInfo(challenge string) map[string]interface{} AcceptLoginRequest(challenge string, payload AcceptLoginRequestPayload) map[string]interface{} GetConsentRequestInfo(challenge string) map[string]interface{} AcceptConsentRequest(challenge string, payload AcceptConsentRequestPayload) map[string]interface{} RejectConsentRequest(challenge string, payload RejectConsentRequestPayload) map[string]interface{} }
type DefaultHydraHelper ¶
type DefaultHydraHelper struct {
// contains filtered or unexported fields
}
func (*DefaultHydraHelper) AcceptConsentRequest ¶
func (dhh *DefaultHydraHelper) AcceptConsentRequest(challenge string, payload AcceptConsentRequestPayload) map[string]interface{}
AcceptConsentRequest sends an accept login request to hydra
func (*DefaultHydraHelper) AcceptLoginRequest ¶
func (dhh *DefaultHydraHelper) AcceptLoginRequest(challenge string, payload AcceptLoginRequestPayload) map[string]interface{}
AcceptLoginRequest sends an accept login request to hydra
func (*DefaultHydraHelper) GetConsentRequestInfo ¶
func (dhh *DefaultHydraHelper) GetConsentRequestInfo(challenge string) map[string]interface{}
GetConsentRequestInfo retrieves information to drive decisions over how to deal with the consent request
func (*DefaultHydraHelper) GetLoginRequestInfo ¶
func (dhh *DefaultHydraHelper) GetLoginRequestInfo(challenge string) map[string]interface{}
GetLoginRequestInfo retrieves information to drive decisions over how to deal with the login request
func (*DefaultHydraHelper) Init ¶
func (dhh *DefaultHydraHelper) Init(adminURL string) Api
func (*DefaultHydraHelper) RejectConsentRequest ¶
func (dhh *DefaultHydraHelper) RejectConsentRequest(challenge string, payload RejectConsentRequestPayload) map[string]interface{}
RejectConsentRequest sends a reject login request to hydra
type RejectConsentRequestPayload ¶
type RejectConsentRequestPayload struct { Error string `json:"error"` ErrorDescription string `json:"error_description"` }
RejectConsentRequestPayload holds the data to communicate with hydra's reject consent api
type TokenSessionPayload ¶
type TokenSessionPayload struct { IDToken interface{} `json:"id_token"` AccessToken interface{} `json:"access_token"` }
TokenSessionPayload holds additional data to be carried with the created token