Documentation ¶
Index ¶
- type JwtContext
- func (c *JwtContext) ExchangeToken(ctx context.Context, token string, fromClient string, toClient string) (*oauth2.Token, error)deprecated
- func (c *JwtContext) ExchangeTokenWithConfig(ctx context.Context, token string, toClient string, oauthConfig oauth2.Config) (*oauth2.Token, error)deprecated
- func (c *JwtContext) GetToken(ctx context.Context, client string, username string, pwd string) (*oauth2.Token, error)
- func (c *JwtContext) GetTokenFromLiteralAccessToken(ctx context.Context, literalAccessToken, clientId string, ...) (*oauth2.Token, error)
- func (c *JwtContext) GetTokenFromLiteralAccessTokenWithConfig(ctx context.Context, literalAccessToken string, withOfflineRefresh bool, ...) (*oauth2.Token, error)
- func (c *JwtContext) OAuthConfig(ctx context.Context, clientId string, clientSecret string) (*oauth2.Config, error)
- func (c *JwtContext) OAuthEndpoint(ctx context.Context) (*oauth2.Endpoint, error)
- func (c *JwtContext) RefreshToken(ctx context.Context, refreshToken string, client string) (*oauth2.Token, error)
- func (c *JwtContext) RefreshTokenWithConfig(ctx context.Context, refreshToken string, oauthConfig oauth2.Config) (*oauth2.Token, error)
- func (c *JwtContext) Sourcify(ctx context.Context, token *oauth2.Token, client string) (oauth2.TokenSource, error)
- func (c *JwtContext) VerifyToken(ctx context.Context, token string, clientId string) (*KeycloakToken, error)
- func (c *JwtContext) VerifyTokenWithConfig(ctx context.Context, token string, config oidc.Config) (*KeycloakToken, error)
- type KeycloakToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JwtContext ¶
type JwtContext struct {
// contains filtered or unexported fields
}
func NewJwtContext ¶
func NewJwtContext(realmUrl string) *JwtContext
func (*JwtContext) ExchangeToken
deprecated
func (*JwtContext) GetTokenFromLiteralAccessToken ¶
func (*JwtContext) GetTokenFromLiteralAccessTokenWithConfig ¶
func (*JwtContext) OAuthConfig ¶
func (*JwtContext) OAuthEndpoint ¶
func (*JwtContext) RefreshToken ¶
func (*JwtContext) RefreshTokenWithConfig ¶
func (*JwtContext) Sourcify ¶
func (c *JwtContext) Sourcify(ctx context.Context, token *oauth2.Token, client string) (oauth2.TokenSource, error)
func (*JwtContext) VerifyToken ¶
func (c *JwtContext) VerifyToken(ctx context.Context, token string, clientId string) (*KeycloakToken, error)
func (*JwtContext) VerifyTokenWithConfig ¶
func (c *JwtContext) VerifyTokenWithConfig(ctx context.Context, token string, config oidc.Config) (*KeycloakToken, error)
type KeycloakToken ¶
type KeycloakToken struct {
*oidc.IDToken
}
func (*KeycloakToken) ClientRoles ¶
func (t *KeycloakToken) ClientRoles(clientId string) ([]string, error)
Click to show internal directories.
Click to hide internal directories.