Documentation
¶
Index ¶
- Variables
- func Authorize(ctx context.Context, c *clientcredentials.Config) (*http.Client, error)
- func GetPublicKey(ctx context.Context, host string) (*rsa.PublicKey, error)
- func HasRole(roles ...role.Role) func(http.Handler) http.Handler
- func ParseToken() func(http.Handler) http.Handler
- func TestServer(t *testing.T) (string, func())
- type Token
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func HasRole ¶
Parse a JWT token from request. And check if token has role from provided list. If list of roles is empty, just check if token is valid.
func ParseToken ¶ added in v0.2.3
Parse a JWT token from request. Not throw error if token is not provided!
func TestServer ¶ added in v0.4.5
Types ¶
Click to show internal directories.
Click to hide internal directories.