Documentation ¶
Index ¶
- Variables
- func AccessLog(ctx *gin.Context)
- func Cache(store cache.Cache, expire time.Duration) gin.HandlerFunc
- func IntrospectionCheck(compareScopesFunc CompareScopesFunc, endpoint, clientKey, clientSecret string, ...) gin.HandlerFunc
- func LimitRateWithBucket(interval time.Duration, cap int64) gin.HandlerFunc
- func Recover(ctx *gin.Context)
- func ServerDate(ctx *gin.Context)
- func StartTracing(ctx *gin.Context)
- func TracingClientInterceptor() grpc.UnaryClientInterceptor
- func TracingServerInterceptor() grpc.UnaryServerInterceptor
- func TracingServerStreamInterceptor() grpc.StreamServerInterceptor
- type CancelFunc
- type CompareScopesFunc
- type IntrospectionReq
- type IntrospectionResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CacheStatusKey = "Cache-Status" CacheStatusHit = "Hit" CacheStatusSource = "Source" )
Functions ¶
func IntrospectionCheck ¶ added in v0.0.2
func IntrospectionCheck(compareScopesFunc CompareScopesFunc, endpoint, clientKey, clientSecret string, cancelFunc CancelFunc) gin.HandlerFunc
func LimitRateWithBucket ¶
func LimitRateWithBucket(interval time.Duration, cap int64) gin.HandlerFunc
func ServerDate ¶
func StartTracing ¶
func TracingClientInterceptor ¶
func TracingClientInterceptor() grpc.UnaryClientInterceptor
func TracingServerInterceptor ¶
func TracingServerInterceptor() grpc.UnaryServerInterceptor
TracingServerInterceptor 拦截器
func TracingServerStreamInterceptor ¶
func TracingServerStreamInterceptor() grpc.StreamServerInterceptor
Types ¶
type CancelFunc ¶ added in v0.0.2
type CompareScopesFunc ¶ added in v0.0.2
type IntrospectionReq ¶ added in v0.0.2
type IntrospectionReq struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` TokenTypeHint string `protobuf:"bytes,2,opt,name=token_type_hint,json=tokenTypeHint,proto3" json:"token_type_hint,omitempty"` ClientKey string `protobuf:"bytes,3,opt,name=client_key,json=clientKey,proto3" json:"client_key,omitempty"` ClientSecret string `protobuf:"bytes,4,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` }
type IntrospectionResp ¶ added in v0.0.2
type IntrospectionResp struct { Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"` Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"` ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` TokenType string `protobuf:"bytes,5,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` Exp int64 `protobuf:"varint,6,opt,name=exp,proto3" json:"exp,omitempty"` Iat int64 `protobuf:"varint,7,opt,name=iat,proto3" json:"iat,omitempty"` Nbf int64 `protobuf:"varint,8,opt,name=nbf,proto3" json:"nbf,omitempty"` Sub string `protobuf:"bytes,9,opt,name=sub,proto3" json:"sub,omitempty"` Aud string `protobuf:"bytes,10,opt,name=aud,proto3" json:"aud,omitempty"` Iss string `protobuf:"bytes,11,opt,name=iss,proto3" json:"iss,omitempty"` Jti string `protobuf:"bytes,12,opt,name=jti,proto3" json:"jti,omitempty"` }
Click to show internal directories.
Click to hide internal directories.