Documentation
¶
Index ¶
- Variables
- type Core
- func (c *Core) AuthURL(providerID string, state string) (string, error)
- func (c *Core) Claims(token *TokenInfo) (jws.Claims, error)
- func (c *Core) GenTokenInfo(providerID string, code string) (*TokenInfo, error)
- func (c *Core) JwtToken(claims jws.Claims) ([]byte, error)
- func (c *Core) LocalEnabled() bool
- func (c *Core) Providers() []string
- func (c *Core) PublicKeys() ([]string, error)
- func (c *Core) RedirectURI() string
- type CoreAuth
- type RSATokenizer
- type TokenInfo
- type Tokenizer
Constants ¶
This section is empty.
Variables ¶
View Source
var SigningMethods = map[string]crypto.SigningMethod{ "RS256": crypto.SigningMethodRS256, "RS384": crypto.SigningMethodRS384, "RS512": crypto.SigningMethodRS512, "HS256": crypto.SigningMethodHS256, "HS384": crypto.SigningMethodHS384, "HS512": crypto.SigningMethodHS512, "ES256": crypto.SigningMethodES256, "ES384": crypto.SigningMethodES384, "ES512": crypto.SigningMethodES512, }
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct { Config *config.Config Tokenizer Tokenizer // contains filtered or unexported fields }
func (*Core) GenTokenInfo ¶
func (*Core) LocalEnabled ¶
func (*Core) PublicKeys ¶
func (*Core) RedirectURI ¶
type CoreAuth ¶
type CoreAuth interface { PublicKeys() ([]string, error) GenTokenInfo(provider string, code string) (*TokenInfo, error) Claims(token *TokenInfo) (jws.Claims, error) JwtToken(jws.Claims) ([]byte, error) RedirectURI() string AuthURL(provider string, state string) (string, error) Providers() []string }
CoreAuth is the central interface of jwt-proxy. It provides all function necessary for handling the redirect to the provider, process the login, enrich the provider's token with some custom parameters and return the JWT token to the callback URI.
type RSATokenizer ¶
type RSATokenizer struct {
// contains filtered or unexported fields
}
type TokenInfo ¶
TokenInfo wraps oauth.Token and adds two additional fields: Provider is the OAuth provider, e.g. github or facebook UserInfo is the map of user info claims from the provider
type Tokenizer ¶
Tokenizer creates a byte array from an input map.
func NewRSATokenizer ¶
func NewRSATokenizer(signingMethod crypto.SigningMethod, privKey *rsa.PrivateKey) Tokenizer
Click to show internal directories.
Click to hide internal directories.