Documentation ¶
Index ¶
- Constants
- func Client(tls bool) (*http.Client, error)
- func ContainsValidSigningKey(ks []Key, alg string) bool
- func PublicSigningKeyMap(keys []Key, filter string) map[string]Key
- func RetrievePublicKeyInstances(km map[string]Key) (map[string]Key, error)
- type AuthConfig
- type AuthInfo
- type Key
- type KeySet
Constants ¶
const ( // AuthorizeEndpoint ... AuthorizeEndpoint = "http://localhost:9011/oauth2/authorize" // JWKSEndpoint ... JWKSEndpoint = "http://localhost:9011/.well-known/jwks.json" // LoginEndpoint ... LoginEndpoint = "http://localhost:9011/api/login" // PublicKeyEndpoint ... PublicKeyEndpoint = "http://localhost:9011/api/jwt/public-key" // TokenEndpoint ... TokenEndpoint = "http://localhost:9011/oauth2/token" )
Variables ¶
This section is empty.
Functions ¶
func Client ¶
Client returns a http.Client instance with TLS transport configured if tls is set to true.
func ContainsValidSigningKey ¶
ContainsValidSigningKey looks for the public signing key with (use=sign) and specified signing method (alg).
func PublicSigningKeyMap ¶
PublicSigningKeyMap filters the keyset by JWK property "use" and returns the resulting map.
Types ¶
type AuthConfig ¶
type AuthConfig struct { ClientID string ClientSecret string GrantType string Issuer string TokenURI string RedirectURI string // Must match FA config for "Authorized redirect URLs" }
AuthConfig holds configuration for external IDP integration.
type AuthInfo ¶
type AuthInfo struct { AccessToken string `json:"access_token"` ExpiresIn float64 `json:"expires_in"` TokenType string `json:"token_type"` UserID string `json:"userId"` }
AuthInfo represents incomming data from the identity provider.
type Key ¶
type Key struct { Alg string `json:"alg"` ID string `json:"kid"` PublicKeyPEM string `json:"publicKey"` Use string `json:"use"` Instance *rsa.PublicKey }
Key represents a JSON Web Key
func PublicSigningKey ¶
PublicSigningKey retrieves the public signing key identified by the passed key ID.
func RetrievePublicKeyInstance ¶
RetrievePublicKeyInstance gets the public signing key from the Identity Provider service and parses the PEM key representation into a key instance.