Documentation ¶
Index ¶
- func DecodeJWT(rt *env.Runtime, tokenString string) (c domain.RequestContext, claims jwt.Claims, err error)
- func DecodeKeycloakJWT(t, pk string) (c jwt.MapClaims, err error)
- func FindJWT(r *http.Request) (token string)
- func GenerateJWT(rt *env.Runtime, user, org, domain string) string
- func StripAuthSecrets(r *env.Runtime, provider, config string) string
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJWT ¶
func DecodeJWT(rt *env.Runtime, tokenString string) (c domain.RequestContext, claims jwt.Claims, err error)
DecodeJWT decodes raw token.
func DecodeKeycloakJWT ¶
DecodeKeycloakJWT takes in Keycloak token string and decodes it.
func GenerateJWT ¶
GenerateJWT generates JSON Web Token (http://jwt.io)
Types ¶
type Handler ¶
Handler contains the runtime information such as logging and database.
func (*Handler) Login ¶
func (h *Handler) Login(w http.ResponseWriter, r *http.Request)
Login user based up HTTP Authorization header. An encrypted authentication token is issued with an expiry date.
func (*Handler) ValidateToken ¶
func (h *Handler) ValidateToken(w http.ResponseWriter, r *http.Request)
ValidateToken finds and validates authentication token.
Click to show internal directories.
Click to hide internal directories.