Documentation ¶
Index ¶
- type DefaultClientValidator
- func (x *DefaultClientValidator) ExractClientCredentials(ctx *fasthttp.RequestCtx) (r *model.Credential, err, errDesc error)
- func (x *DefaultClientValidator) VerifyCredential(credential *model.Credential) (model.IClient, error, error)
- func (x *DefaultClientValidator) VerifyCredentialGrantType(credential *model.Credential, grantType string) (model.IClient, error, error)
- func (x *DefaultClientValidator) VerifyCredentialGrantTypeScope(credential *model.Credential, grantType, scopesStr string) (model.IClient, error, error)
- func (x *DefaultClientValidator) VerifyRedirectURI(clientID, redirectURI string) (model.IClient, error, error)
- func (x *DefaultClientValidator) VerifyRespTypeRedirectURIScope(clientID, responseType, redirectURI, scopesStr string) (model.IClient, error, error)
- type DefaultPkceValidator
- type DefaultResourceOwnerValidator
- type IClientValidator
- type IPkceValidator
- type IResourceOwnerValidator
- type ISecretEncryptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultClientValidator ¶
type DefaultClientValidator struct {
ClientStore store.IClientStore
}
func (*DefaultClientValidator) ExractClientCredentials ¶
func (x *DefaultClientValidator) ExractClientCredentials(ctx *fasthttp.RequestCtx) (r *model.Credential, err, errDesc error)
ExractClientCredentials extract client credential from request
func (*DefaultClientValidator) VerifyCredential ¶
func (x *DefaultClientValidator) VerifyCredential(credential *model.Credential) (model.IClient, error, error)
VerifyCredential verify client id & secret
func (*DefaultClientValidator) VerifyCredentialGrantType ¶
func (x *DefaultClientValidator) VerifyCredentialGrantType(credential *model.Credential, grantType string) (model.IClient, error, error)
VerifyCredentialGrantType verify client id, secret & grant type
func (*DefaultClientValidator) VerifyCredentialGrantTypeScope ¶
func (x *DefaultClientValidator) VerifyCredentialGrantTypeScope(credential *model.Credential, grantType, scopesStr string) (model.IClient, error, error)
VerifyCredentialGrantTypeScope verify client id, secret, grant type & scopes
func (*DefaultClientValidator) VerifyRedirectURI ¶
func (x *DefaultClientValidator) VerifyRedirectURI(clientID, redirectURI string) (model.IClient, error, error)
VerifyRespTypeRedirectURIScope verify client id & redirect uri
func (*DefaultClientValidator) VerifyRespTypeRedirectURIScope ¶
func (x *DefaultClientValidator) VerifyRespTypeRedirectURIScope(clientID, responseType, redirectURI, scopesStr string) (model.IClient, error, error)
VerifyRespTypeRedirectURIScope verify client id & secret, response type, scopes, redirect uri
type DefaultPkceValidator ¶
type DefaultPkceValidator struct{}
func (*DefaultPkceValidator) Verify ¶
func (x *DefaultPkceValidator) Verify(codeVerifier, codeChanllenge, codeChanllengeMethod string) bool
type DefaultResourceOwnerValidator ¶
type DefaultResourceOwnerValidator struct{}
type IClientValidator ¶
type IClientValidator interface { // ExractClientCredentials extract client credential from request ExractClientCredentials(ctx *fasthttp.RequestCtx) (*model.Credential, error, error) // VerifyCredential verify client id & secret VerifyCredential(credential *model.Credential) (model.IClient, error, error) // VerifyCredentialGrantType verify client id, secret & grant type VerifyCredentialGrantType(credential *model.Credential, grantType string) (model.IClient, error, error) // VerifyCredentialGrantTypeScope verify client id, secret, grant type & scopes VerifyCredentialGrantTypeScope(credential *model.Credential, grantType, scopesStr string) (model.IClient, error, error) // VerifyRespTypeRedirectURIScope verify client, response type, scopes, redirect uri VerifyRespTypeRedirectURIScope(clientID, responseType, redirectURI, scopesStr string) (model.IClient, error, error) // VerifyRedirectURI verify client id, redirect uri VerifyRedirectURI(clientID, logoutRedirectURI string) (model.IClient, error, error) }
func NewDefaultClientValidator ¶
func NewDefaultClientValidator(clientStore store.IClientStore) IClientValidator
type IPkceValidator ¶
type IPkceValidator interface {
Verify(codeVerifier, codeChanllenge, codeChanllengeMethod string) bool
}
func NewDefaultPkceValidator ¶
func NewDefaultPkceValidator() IPkceValidator
type IResourceOwnerValidator ¶
func NewDefaultResourceOwnerValidator ¶
func NewDefaultResourceOwnerValidator() IResourceOwnerValidator
type ISecretEncryptor ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.