Documentation ¶
Index ¶
- func AddInterceptors(logger *zap.Logger, tracer opentracing.Tracer, opts []grpc.ServerOption) []grpc.ServerOption
- func AuthMiddleware(ctx context.Context) (context.Context, error)
- func NewJWTUnaryInterceptor(ctx context.Context, ks *jose.JSONWebKeySet, token string) (context.Context, error)
- func NewJWtMiddleware(ks *jose.JSONWebKeySet, token string) (alice.Constructor, error)
- func VerifyToken(t, iss string, aud []string, ks *jose.JSONWebKeySet) (map[string]interface{}, error)
- type Config
- type DiscoveryResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInterceptors ¶
func AddInterceptors(logger *zap.Logger, tracer opentracing.Tracer, opts []grpc.ServerOption) []grpc.ServerOption
AddInterceptors AddInterceptors: Add interceptors to the grpc server
func NewJWTUnaryInterceptor ¶
func NewJWTUnaryInterceptor(ctx context.Context, ks *jose.JSONWebKeySet, token string) (context.Context, error)
NewJWTUnaryInterceptor add users claims to outgoing context
func NewJWtMiddleware ¶
func NewJWtMiddleware(ks *jose.JSONWebKeySet, token string) (alice.Constructor, error)
NewJWtMiddleware verify the user's token
Types ¶
type DiscoveryResponse ¶
type DiscoveryResponse struct { fx.Out RevocationEndpoint string `name:"revocation_endpoint"` JSONWebKeySet *jose.JSONWebKeySet }
func NewJwk ¶
func NewJwk() (DiscoveryResponse, error)
NewJwk NewJwk() get certificate from openIdConnect
Click to show internal directories.
Click to hide internal directories.