Documentation
¶
Index ¶
- type Authorization
- type Client
- func (c *Client) GetClientId() string
- func (c *Client) GetClientName() string
- func (c *Client) GetGrantTypes() []string
- func (c *Client) GetPostLogoutUris() []string
- func (c *Client) GetRedirectUris() []string
- func (c *Client) GetRequireConsent() bool
- func (c *Client) GetRequirePKCE() bool
- func (c *Client) GetScopes() []string
- func (c *Client) GetSecret() []string
- func (c *Client) GetWebOrigins() []string
- type IClient
- type IUser
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization struct { Id string `json:"id"` Issuer string `json:"iss"` ClientId string `json:"client_id"` PrincipalName string `json:"principal_name"` Subject string `json:"subject"` GrantType string `json:"grant_type"` ResponseType string `json:"response_type"` Scope string `json:"scope"` // Attributes map[string]interface{} `json:"attributes"` Code string `json:"code"` Nonce string `json:"nonce"` AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` IDToken string `json:"id_token"` CodeChallenge string `json:"code_challenge"` CodeChallengeMethod string `json:"code_challenge_method"` DeviceCode string `json:"device_code"` ExpiresAt int64 `json:"expires_at"` //Unix timestamp RefreshTokenExpiresAt int64 `json:"refresh_token_expires_at"` UserCode string `json:"user_code"` }
func (*Authorization) IncludeOpenId ¶
func (a *Authorization) IncludeOpenId() bool
func (*Authorization) UpdateExiresAt ¶
func (a *Authorization) UpdateExiresAt(lifeTime int64)
func (*Authorization) UpdateRefreshTokenExpiresAt ¶
func (a *Authorization) UpdateRefreshTokenExpiresAt(lifeTime int64)
type Client ¶
type Client struct { Id string `json:"id"` ClientId string `json:"client_id"` Secret string `json:"secret"` ClientScope string `json:"client_scope"` ClientName string `json:"client_name"` GrantTypes []string `json:"grant_type"` RequireConsent bool `json:"require_consent"` RequirePKCE bool `json:"require_pkce"` RedirectUris []string `json:"redirect_uris"` WebOrigins string `json:"web_origins"` PostLogoutUris []string `json:"post_logout_uri"` // 创建时间 CreatedAt string `json:"created_at"` // 更新时间 UpdatedAt string `json:"updated_at"` }
func (*Client) GetClientId ¶
func (*Client) GetClientName ¶
func (*Client) GetGrantTypes ¶
func (*Client) GetPostLogoutUris ¶
func (*Client) GetRedirectUris ¶
func (*Client) GetRequireConsent ¶
func (*Client) GetRequirePKCE ¶
func (*Client) GetWebOrigins ¶ added in v0.12.1
type IClient ¶
type IClient interface { // GetScopes returns a list of scopes that the client is allowed to access. GetScopes() []string // GetClientId returns the unique identifier of the client. GetClientId() string // GetClientName returns the name of the client. GetClientName() string // GetGrantTypes returns a list of authorization types supported by the client. GetGrantTypes() []string // GetRequireConsent returns whether user consent is required. GetRequireConsent() bool // GetRequirePKCE returns whether PKCE (Proof Key for Code Exchange) is required. GetRequirePKCE() bool // GetRedirectUris returns a list of URIs to which the client redirects. GetRedirectUris() []string // GetPostLogoutUris returns a list of URIs to which the client redirects after logout. GetPostLogoutUris() []string // GetSecret returns a list of secrets associated with the client. GetSecret() []string // GetWebOrigins returns a list of web origins associated with the client. GetWebOrigins() []string }
IClient defines the client interface, including a series of operations related to client configuration.
Click to show internal directories.
Click to hide internal directories.