Documentation
¶
Index ¶
- func AuthenticateRequest(cfg config.Config, ds *repo.Repo, req *http.Request) (*jwt.Claims, bool, error)
- func ClaimsFromContext(ctx context.Context) *jwt.Claims
- func ContextWithClaims(ctx context.Context, claims *jwt.Claims) context.Context
- func ContextWithToken(ctx context.Context, token string) context.Context
- func FindCookie(cookieName string, headers http.Header) *http.Cookie
- func NewAuthInterceptor(registry *protoregistry.Files) connect.UnaryInterceptorFunc
- func NewErrorInterceptor() connect.UnaryInterceptorFunc
- func NewJWTMiddleware(cfg config.Config, repo *repo.Repo, next http.Handler, ...) http.HandlerFunc
- func TokenFromContext(ctx context.Context) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateRequest ¶
func ClaimsFromContext ¶
ClaimsFromContext returns the JWT claims associated with ctx.
func ContextWithClaims ¶
ContextWithClaims returns a new context.Context with claims attached. Use ClaimsFromContext to retrieve the claims.
func NewAuthInterceptor ¶
func NewAuthInterceptor(registry *protoregistry.Files) connect.UnaryInterceptorFunc
func NewErrorInterceptor ¶
func NewErrorInterceptor() connect.UnaryInterceptorFunc
func NewJWTMiddleware ¶
func TokenFromContext ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.