Documentation ¶
Index ¶
- type OauthService
- func (os *OauthService) GetClaimsFromToken(tokenString string) jwt.MapClaims
- func (os *OauthService) GetConfig(TokenEndpointPath string, ClientID string, ClientSecret string, ...) clientcredentials.Config
- func (os *OauthService) GetOauthToken(ctx context.Context, config *clientcredentials.Config) (*oauth2.Token, error)
- func (os *OauthService) Inject(config ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OauthService ¶
type OauthService struct {
// contains filtered or unexported fields
}
OauthService for internal direct token grant
func (*OauthService) GetClaimsFromToken ¶
func (os *OauthService) GetClaimsFromToken(tokenString string) jwt.MapClaims
GetClaimsFromToken is a "fix" for the oauth2 libs inability to decode extra data from the token
func (*OauthService) GetConfig ¶
func (os *OauthService) GetConfig(TokenEndpointPath string, ClientID string, ClientSecret string, GrantType string) clientcredentials.Config
GetConfig returns an oauth config object
func (*OauthService) GetOauthToken ¶
func (os *OauthService) GetOauthToken(ctx context.Context, config *clientcredentials.Config) (*oauth2.Token, error)
GetOauthToken wraps the oauth2 call to retrieve a token
func (*OauthService) Inject ¶
func (os *OauthService) Inject(config *struct { BaseURL string `inject:"config:internalauth.baseurl"` })
Inject configuration
Click to show internal directories.
Click to hide internal directories.