Documentation
¶
Index ¶
- func AddHandler(pathMatcher func(string) bool, ...)
- func AddMockCertsEndpointHandler()
- func AuthHeaderValue(token string) string
- func ClearHandlers()
- func Contains(submatch string) func(string) bool
- func GetMainSigningKey() rsa.PrivateKey
- func GetMockServerClient() *fasthttp.Client
- func GetMockServerUrl() string
- func GetSignedToken(principal string, roles []string) string
- func GetSignedTokenWithClaims(principal string, roles []string, claims map[string]interface{}) string
- func GetTestToken(principal string, roles []string) *jwt.Token
- func GetTestTokenWithClaims(principal string, roles []string, claims map[string]interface{}) *jwt.Token
- func SignToken(token *jwt.Token, kid string) (string, error)
- func StartMockServer()
- func StopMockServer()
- type CertResponse
- type CertResponseKey
- type OidcResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHandler ¶
func AddMockCertsEndpointHandler ¶
func AddMockCertsEndpointHandler()
func AuthHeaderValue ¶
func ClearHandlers ¶
func ClearHandlers()
func GetMainSigningKey ¶
func GetMainSigningKey() rsa.PrivateKey
func GetMockServerClient ¶
func GetMockServerUrl ¶
func GetMockServerUrl() string
func GetSignedToken ¶
func GetTestTokenWithClaims ¶
func StartMockServer ¶
func StartMockServer()
func StopMockServer ¶
func StopMockServer()
Types ¶
type CertResponse ¶
type CertResponse struct {
Keys []CertResponseKey `json:"keys"`
}
type CertResponseKey ¶
type CertResponseKey struct { Kid string `json:"kid"` Kty string `json:"kty"` Alg string `json:"alg"` Use string `json:"use"` N string `json:"n"` E string `json:"e"` }
CertResponseKey is returned by the certs endpoint
type OidcResponse ¶
type OidcResponse struct {
JwksUri string `json:"jwks_uri"`
}
Click to show internal directories.
Click to hide internal directories.