Documentation ¶
Index ¶
- func GetUser(ctx context.Context) (*contracts.UserInfo, error)
- func MustGetUser(ctx context.Context) *contracts.UserInfo
- func SetUser(ctx context.Context, info *contracts.UserInfo) context.Context
- func StreamServerInterceptor() grpc.StreamServerInterceptor
- func UnaryServerInterceptor() grpc.UnaryServerInterceptor
- type AccessTokenAuth
- type Authn
- type CtxTokenInfo
- type JwtAuth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.StreamServerInterceptor
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.UnaryServerInterceptor
Types ¶
type AccessTokenAuth ¶
type AccessTokenAuth struct {
// contains filtered or unexported fields
}
func NewAccessTokenAuth ¶
func NewAccessTokenAuth(app contracts.ApplicationInterface) *AccessTokenAuth
func (*AccessTokenAuth) VerifyToken ¶
func (a *AccessTokenAuth) VerifyToken(t string) (*contracts.JwtClaims, bool)
type Authn ¶
type Authn struct { Authns []contracts.Authenticator // contains filtered or unexported fields }
type CtxTokenInfo ¶
type CtxTokenInfo struct{}
type JwtAuth ¶
type JwtAuth struct {
// contains filtered or unexported fields
}
func NewJwtAuth ¶
func NewJwtAuth(priKey *rsa.PrivateKey, pubKey *rsa.PublicKey) *JwtAuth
Click to show internal directories.
Click to hide internal directories.