Documentation
¶
Index ¶
Constants ¶
View Source
const CLIENT_CACHE_EXPIRES = 3600
View Source
const GRANT_TYPE_CLIENT_CREDENTIALS = "client_credentials"
View Source
const GRANT_TYPE_PASSWORD = "password"
View Source
const GRANT_TYPE_REFRESH_TOKEN = "refresh_token"
Variables ¶
This section is empty.
Functions ¶
func NewTokenService ¶
func NewTokenService() *tokenService
Types ¶
type OauthGrantIfc ¶
type OauthGrantIfc interface {
GetGrantType() string
GetClientId() string
GetUsername() string
ToKey() string
}
func NewOauthGrant ¶
func NewOauthGrant(grantType, clientId, username string) OauthGrantIfc
type TokenServiceIfc ¶
type TokenServiceIfc interface {
// Embedded Interface(s)
dep.DependencyInjectableIfc
// Our own interface
AuthorizeGrantPassword(username, password, clientId string) (model.AccessTokenInfoIfc, error)
AuthorizeGrantClientCredentials(clientId, clientSecret string) (model.AccessTokenInfoIfc, error)
AuthorizeGrantRefresh(clientId, clientSecret, refreshToken string) (model.AccessTokenInfoIfc, error)
}
Click to show internal directories.
Click to hide internal directories.