Documentation ¶
Index ¶
- func DeleteClient(url string, client_id string) (err error)
- type Client
- type ConsentAcceptRequest
- type ConsentAcceptResponse
- type ConsentAcceptSession
- type ConsentRejectRequest
- type ConsentRejectResponse
- type ConsentResponse
- type CreateClientRequest
- type CreateClientResponse
- type DeleteLoginSessionRequest
- type DeleteLoginSessionResponse
- type HydraClient
- type IntrospectRequest
- type IntrospectResponse
- type LoginAcceptRequest
- type LoginAcceptResponse
- type LoginRejectRequest
- type LoginRejectResponse
- type LoginResponse
- type LogoutAcceptRequest
- type LogoutAcceptResponse
- type LogoutResponse
- type Oauth2Client
- type ReadClientResponse
- type UpdateClientRequest
- type UpdateClientResponse
- type UserInfoResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteClient ¶
Types ¶
type Client ¶
type Client struct { Id string `json:"client_id,omitempty"` Name string `json:"client_name,omitempty"` Secret string `json:"client_secret,omitempty"` Scope string `json:"scope,omitempty"` GrantTypes []string `json:"grant_types,omitempty"` Audience []string `json:"audience,omitempty"` ResponseTypes []string `json:"response_types,omitempty"` RedirectUris []string `json:"redirect_uris,omitempty"` TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty"` PostLogoutRedirectUris []string `json:"post_logout_redirect_uris,omitempty"` }
type ConsentAcceptRequest ¶
type ConsentAcceptRequest struct { Subject string `json:"subject,omitempty"` GrantScope []string `json:"grant_scope"` GrantAccessTokenAudience []string `json:"grant_access_token_audience,omitempty"` Session ConsentAcceptSession `json:"session" binding:"required"` Remember bool `json:"remember" binding:"required"` RememberFor int `json:"remember_for" binding:"required"` }
type ConsentAcceptResponse ¶
type ConsentAcceptResponse struct {
RedirectTo string `json:"redirect_to"`
}
func AcceptConsent ¶
func AcceptConsent(url string, client *HydraClient, challenge string, hydraConsentAcceptRequest ConsentAcceptRequest) (ConsentAcceptResponse, error)
config.Hydra.ConsentRequestAcceptUrl
type ConsentAcceptSession ¶
type ConsentRejectRequest ¶
type ConsentRejectResponse ¶
type ConsentRejectResponse struct {
RedirectTo string `json:"redirect_to"`
}
func RejectConsent ¶
func RejectConsent(url string, client *HydraClient, challenge string, hydraConsentRejectRequest ConsentRejectRequest) (ConsentRejectResponse, error)
config.Hydra.ConsentRequestRejectUrl
type ConsentResponse ¶
type ConsentResponse struct { Subject string `json:"subject"` Skip bool `json:"skip"` RedirectTo string `json:"redirect_to"` GrantAccessTokenAudience string `json:"grant_access_token_audience"` RequestUrl string `json:"request_url"` RequestedAccessTokenAudience []string `json:"requested_access_token_audience"` RequestedScopes []string `json:"requested_scope"` Client Oauth2Client `json:"client"` Context map[string]string `json:"context"` }
func GetConsent ¶
func GetConsent(url string, client *HydraClient, challenge string) (ConsentResponse, error)
config.Hydra.ConsentRequestUrl
type CreateClientRequest ¶
type CreateClientRequest Client
type CreateClientResponse ¶
type CreateClientResponse Client
func CreateClient ¶
func CreateClient(url string, createClientRequest CreateClientRequest) (createClientResponse CreateClientResponse, err error)
type DeleteLoginSessionRequest ¶
type DeleteLoginSessionRequest struct {
Subject string `json:"subject"`
}
type DeleteLoginSessionResponse ¶
type DeleteLoginSessionResponse struct { Debug string `json:"debug"` Error string `json:"error"` ErrorDescription string `json:"error_description"` StatusCode int64 `json:"status_code"` }
SESSION STRUCT BEGIN
func DeleteLoginSessions ¶
func DeleteLoginSessions(url string, client *HydraClient, deleteLoginSessionsRequest DeleteLoginSessionRequest) (DeleteLoginSessionResponse, error)
SESSION FUNC BEGIN config.Hydra.LogoutRequestAcceptUrl
type HydraClient ¶
func NewHydraClient ¶
func NewHydraClient(config *clientcredentials.Config) *HydraClient
type IntrospectRequest ¶
type IntrospectResponse ¶
type IntrospectResponse struct { Active bool `json:"active"` Aud []string `json:"aud"` ClientId string `json:"client_id"` Exp int64 `json:"exp"` Iat int64 `json:"iat"` Iss string `json:"iss"` Nbf int64 `json:"nbf"` ObfuscatedSubject string `json:"obfuscated_subject"` Scope string `json:"scope"` Sub string `json:"sub"` TokenType string `json:"token_type"` Username string `json:"username"` }
https://www.ory.sh/docs/hydra/sdk/api#schemaoauth2tokenintrospection
func IntrospectToken ¶
func IntrospectToken(introspectUrl string, client *HydraClient, introspectRequest IntrospectRequest) (IntrospectResponse, error)
type LoginAcceptRequest ¶
type LoginAcceptResponse ¶
type LoginAcceptResponse struct {
RedirectTo string `json:"redirect_to"`
}
func AcceptLogin ¶
func AcceptLogin(url string, client *HydraClient, challenge string, hydraLoginAcceptRequest LoginAcceptRequest) (LoginAcceptResponse, error)
config.Hydra.LoginRequestAcceptUrl
type LoginRejectRequest ¶
type LoginRejectResponse ¶
type LoginRejectResponse struct {
RedirectTo string `json:"redirect_to"`
}
func RejectLogin ¶
func RejectLogin(url string, client *HydraClient, challenge string, hydraLoginAcceptRequest LoginRejectRequest) (hydraLoginRejectResponse LoginRejectResponse, err error)
config.Hydra.LoginRequestRejectUrl
type LoginResponse ¶
type LoginResponse struct { Skip bool `json:"skip"` RedirectTo string `json:"redirect_to"` Subject string `json:"subject"` Client Oauth2Client `json:"client"` }
func GetLogin ¶
func GetLogin(url string, client *HydraClient, challenge string) (LoginResponse, error)
config.Hydra.LoginRequestUrl
type LogoutAcceptRequest ¶
type LogoutAcceptRequest struct { }
type LogoutAcceptResponse ¶
type LogoutAcceptResponse struct {
RedirectTo string `json:"redirect_to"`
}
func AcceptLogout ¶
func AcceptLogout(url string, client *HydraClient, challenge string, hydraLogoutAcceptRequest LogoutAcceptRequest) (LogoutAcceptResponse, error)
config.Hydra.LogoutRequestAcceptUrl
type LogoutResponse ¶
type LogoutResponse struct { RequestUrl string `json:"request_url"` RpInitiated bool `json:"rp_initiated"` Sid string `json:"sid"` Subject string `json:"subject"` }
func GetLogout ¶
func GetLogout(url string, client *HydraClient, challenge string) (LogoutResponse, error)
config.Hydra.LogoutRequestUrl
type Oauth2Client ¶
type Oauth2Client struct {
ClientId string `form:"client_id" json:"client_id,omitempty"`
}
OAuth2 Client BEGIN
type ReadClientResponse ¶
type ReadClientResponse Client
func ReadClient ¶
func ReadClient(url string, client_id string) (readClientResponse ReadClientResponse, err error)
type UpdateClientRequest ¶
type UpdateClientRequest Client
type UpdateClientResponse ¶
type UpdateClientResponse Client
func UpdateClient ¶
func UpdateClient(url string, client_id string, updateClientRequest UpdateClientRequest) (updateClientResponse UpdateClientResponse, err error)
type UserInfoResponse ¶
type UserInfoResponse struct {
Sub string `json:"sub"`
}
func GetUserInfo ¶
func GetUserInfo(url string, client *HydraClient) (UserInfoResponse, error)
config.Hydra.UserInfoUrl
Click to show internal directories.
Click to hide internal directories.