Documentation ¶
Index ¶
Constants ¶
View Source
const ( ResponseTypeCode = "code" ResponseTypeToken = "token" )
View Source
const ( GrantAuthorizationCode = "authorization_code" GrantClientCredentials = "client_credentials" GrantRefreshToken = "refresh_token" )
View Source
const (
Name = "oauth2"
)
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
func NewFactory() eosc.IExtenderDriverFactory
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Types ¶
type Config ¶
type Config struct { AcceptHttpIfAlreadyTerminated bool `json:"accept_http_if_already_terminated"` //Anonymous interface{} `json:"anonymous"` EnableAuthorizationCode bool `json:"enable_authorization_code"` EnableClientCredentials bool `json:"enable_client_credentials"` EnableImplicitGrant bool `json:"enable_implicit_grant"` //EnablePasswordGrant bool `json:"enable_password_grant"` MandatoryScope bool `json:"mandatory_scope"` PersistentRefreshToken bool `json:"persistent_refresh_token"` //Pkce string `json:"pkce"` ProvisionKey string `json:"provision_key"` RefreshTokenTtl int `json:"refresh_token_ttl"` ReuseRefreshToken bool `json:"reuse_refresh_token"` Scopes []string `json:"scopes"` TokenExpiration int `json:"token_expiration"` }
type TokenData ¶
type TokenData struct { AuthenticatedUserid interface{} `json:"authenticated_userid"` Credential struct { Id string `json:"id"` } `json:"credential"` AccessToken string `json:"access_token"` Service interface{} `json:"service"` CreatedAt int64 `json:"created_at"` RefreshToken interface{} `json:"refresh_token"` Scope interface{} `json:"scope"` Ttl int `json:"ttl"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` ClientID string `json:"client_id"` }
type TokenHandler ¶
type TokenHandler struct {
// contains filtered or unexported fields
}
func NewTokenHandler ¶
func NewTokenHandler() *TokenHandler
func (*TokenHandler) ServeHTTP ¶
func (t *TokenHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.