forked from baron/baron-sso
47 lines
2.2 KiB
Go
47 lines
2.2 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type HydraClient struct {
|
|
ClientID string `json:"client_id"`
|
|
ClientName string `json:"client_name,omitempty"`
|
|
ClientSecret string `json:"client_secret,omitempty"` // Added
|
|
ClientURI string `json:"client_uri,omitempty"`
|
|
RedirectURIs []string `json:"redirect_uris,omitempty"`
|
|
GrantTypes []string `json:"grant_types,omitempty"`
|
|
ResponseTypes []string `json:"response_types,omitempty"`
|
|
Scope string `json:"scope,omitempty"`
|
|
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty"`
|
|
Metadata map[string]interface{} `json:"metadata,omitempty"`
|
|
}
|
|
|
|
type HydraConsentRequest struct {
|
|
Challenge string `json:"challenge"`
|
|
RequestedScope []string `json:"requested_scope"`
|
|
RequestedAudience []string `json:"requested_access_token_audience"`
|
|
Skip bool `json:"skip"`
|
|
Subject string `json:"subject"`
|
|
Client HydraClient `json:"client"`
|
|
}
|
|
|
|
type HydraLoginRequest struct {
|
|
Challenge string `json:"challenge"`
|
|
Subject string `json:"subject"`
|
|
Skip bool `json:"skip"`
|
|
Client HydraClient `json:"client"`
|
|
}
|
|
|
|
type HydraConsentSession struct {
|
|
ConsentRequestID string `json:"consent_request_id,omitempty"`
|
|
Subject string `json:"subject,omitempty"`
|
|
GrantedScope []string `json:"grant_scope,omitempty"`
|
|
GrantedAudience []string `json:"grant_access_token_audience,omitempty"`
|
|
Remember bool `json:"remember"`
|
|
RememberFor int `json:"remember_for,omitempty"`
|
|
AuthenticatedAt *time.Time `json:"authenticated_at,omitempty"`
|
|
RequestedAt *time.Time `json:"requested_at,omitempty"`
|
|
HandledAt *time.Time `json:"handled_at,omitempty"`
|
|
Client HydraClient `json:"client,omitempty"`
|
|
ConsentRequest *HydraConsentRequest `json:"consent_request,omitempty"`
|
|
}
|