Documentation ¶
Index ¶
- func RegisterJWTHandler(s server.Server, hdlr JWTHandler, opts ...server.HandlerOption) error
- type AccessAndRefreshToken
- func (*AccessAndRefreshToken) Descriptor() ([]byte, []int)
- func (m *AccessAndRefreshToken) GetAcccessToken() string
- func (m *AccessAndRefreshToken) GetMessage() string
- func (m *AccessAndRefreshToken) GetRefreshToken() string
- func (*AccessAndRefreshToken) ProtoMessage()
- func (m *AccessAndRefreshToken) Reset()
- func (m *AccessAndRefreshToken) String() string
- func (m *AccessAndRefreshToken) XXX_DiscardUnknown()
- func (m *AccessAndRefreshToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AccessAndRefreshToken) XXX_Merge(src proto.Message)
- func (m *AccessAndRefreshToken) XXX_Size() int
- func (m *AccessAndRefreshToken) XXX_Unmarshal(b []byte) error
- type Claims
- func (*Claims) Descriptor() ([]byte, []int)
- func (m *Claims) GetCreationUTC() int64
- func (m *Claims) GetExpirationUTC() int64
- func (m *Claims) GetIsFresh() bool
- func (m *Claims) GetIsRefresh() bool
- func (m *Claims) GetMessage() string
- func (m *Claims) GetScopes() []string
- func (m *Claims) GetUserIdentity() string
- func (m *Claims) GetValid() bool
- func (*Claims) ProtoMessage()
- func (m *Claims) Reset()
- func (m *Claims) String() string
- func (m *Claims) XXX_DiscardUnknown()
- func (m *Claims) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Claims) XXX_Merge(src proto.Message)
- func (m *Claims) XXX_Size() int
- func (m *Claims) XXX_Unmarshal(b []byte) error
- type JWTData
- func (*JWTData) Descriptor() ([]byte, []int)
- func (m *JWTData) GetScopes() []string
- func (m *JWTData) GetUserIdentity() string
- func (*JWTData) ProtoMessage()
- func (m *JWTData) Reset()
- func (m *JWTData) String() string
- func (m *JWTData) XXX_DiscardUnknown()
- func (m *JWTData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JWTData) XXX_Merge(src proto.Message)
- func (m *JWTData) XXX_Size() int
- func (m *JWTData) XXX_Unmarshal(b []byte) error
- type JWTHandler
- type JWTService
- type Token
- func (*Token) Descriptor() ([]byte, []int)
- func (m *Token) GetMessage() string
- func (m *Token) GetToken() string
- func (m *Token) GetTokenType() string
- func (*Token) ProtoMessage()
- func (m *Token) Reset()
- func (m *Token) String() string
- func (m *Token) XXX_DiscardUnknown()
- func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Token) XXX_Merge(src proto.Message)
- func (m *Token) XXX_Size() int
- func (m *Token) XXX_Unmarshal(b []byte) error
- type TokenValid
- func (*TokenValid) Descriptor() ([]byte, []int)
- func (m *TokenValid) GetValid() bool
- func (*TokenValid) ProtoMessage()
- func (m *TokenValid) Reset()
- func (m *TokenValid) String() string
- func (m *TokenValid) XXX_DiscardUnknown()
- func (m *TokenValid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TokenValid) XXX_Merge(src proto.Message)
- func (m *TokenValid) XXX_Size() int
- func (m *TokenValid) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterJWTHandler ¶
func RegisterJWTHandler(s server.Server, hdlr JWTHandler, opts ...server.HandlerOption) error
Types ¶
type AccessAndRefreshToken ¶
type AccessAndRefreshToken struct { AcccessToken string `protobuf:"bytes,1,opt,name=acccessToken,proto3" json:"acccessToken,omitempty"` RefreshToken string `protobuf:"bytes,2,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AccessAndRefreshToken) Descriptor ¶
func (*AccessAndRefreshToken) Descriptor() ([]byte, []int)
func (*AccessAndRefreshToken) GetAcccessToken ¶
func (m *AccessAndRefreshToken) GetAcccessToken() string
func (*AccessAndRefreshToken) GetMessage ¶
func (m *AccessAndRefreshToken) GetMessage() string
func (*AccessAndRefreshToken) GetRefreshToken ¶
func (m *AccessAndRefreshToken) GetRefreshToken() string
func (*AccessAndRefreshToken) ProtoMessage ¶
func (*AccessAndRefreshToken) ProtoMessage()
func (*AccessAndRefreshToken) Reset ¶
func (m *AccessAndRefreshToken) Reset()
func (*AccessAndRefreshToken) String ¶
func (m *AccessAndRefreshToken) String() string
func (*AccessAndRefreshToken) XXX_DiscardUnknown ¶
func (m *AccessAndRefreshToken) XXX_DiscardUnknown()
func (*AccessAndRefreshToken) XXX_Marshal ¶
func (m *AccessAndRefreshToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccessAndRefreshToken) XXX_Merge ¶
func (m *AccessAndRefreshToken) XXX_Merge(src proto.Message)
func (*AccessAndRefreshToken) XXX_Size ¶
func (m *AccessAndRefreshToken) XXX_Size() int
func (*AccessAndRefreshToken) XXX_Unmarshal ¶
func (m *AccessAndRefreshToken) XXX_Unmarshal(b []byte) error
type Claims ¶
type Claims struct { UserIdentity string `protobuf:"bytes,1,opt,name=userIdentity,proto3" json:"userIdentity,omitempty"` Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"` IsFresh bool `protobuf:"varint,3,opt,name=isFresh,proto3" json:"isFresh,omitempty"` IsRefresh bool `protobuf:"varint,4,opt,name=isRefresh,proto3" json:"isRefresh,omitempty"` CreationUTC int64 `protobuf:"varint,5,opt,name=creationUTC,proto3" json:"creationUTC,omitempty"` ExpirationUTC int64 `protobuf:"varint,6,opt,name=expirationUTC,proto3" json:"expirationUTC,omitempty"` Message string `protobuf:"bytes,7,opt,name=message,proto3" json:"message,omitempty"` Valid bool `protobuf:"varint,8,opt,name=valid,proto3" json:"valid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Claims) Descriptor ¶
func (*Claims) GetCreationUTC ¶
func (*Claims) GetExpirationUTC ¶
func (*Claims) GetIsFresh ¶
func (*Claims) GetIsRefresh ¶
func (*Claims) GetMessage ¶
func (*Claims) GetUserIdentity ¶
func (*Claims) ProtoMessage ¶
func (*Claims) ProtoMessage()
func (*Claims) XXX_DiscardUnknown ¶
func (m *Claims) XXX_DiscardUnknown()
func (*Claims) XXX_Marshal ¶
func (*Claims) XXX_Unmarshal ¶
type JWTData ¶
type JWTData struct { UserIdentity string `protobuf:"bytes,1,opt,name=userIdentity,proto3" json:"userIdentity,omitempty"` Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*JWTData) Descriptor ¶
func (*JWTData) GetUserIdentity ¶
func (*JWTData) ProtoMessage ¶
func (*JWTData) ProtoMessage()
func (*JWTData) XXX_DiscardUnknown ¶
func (m *JWTData) XXX_DiscardUnknown()
func (*JWTData) XXX_Marshal ¶
func (*JWTData) XXX_Unmarshal ¶
type JWTHandler ¶
type JWTService ¶
type JWTService interface { FreshToken(ctx context.Context, in *JWTData, opts ...client.CallOption) (*Token, error) AccessAndRefreshTokens(ctx context.Context, in *JWTData, opts ...client.CallOption) (*AccessAndRefreshToken, error) RefreshTokens(ctx context.Context, in *Token, opts ...client.CallOption) (*AccessAndRefreshToken, error) ValidateToken(ctx context.Context, in *Token, opts ...client.CallOption) (*Claims, error) }
func NewJWTService ¶
func NewJWTService(name string, c client.Client) JWTService
type Token ¶
type Token struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` TokenType string `protobuf:"bytes,2,opt,name=tokenType,proto3" json:"tokenType,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Token) Descriptor ¶
func (*Token) GetMessage ¶
func (*Token) GetTokenType ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) XXX_DiscardUnknown ¶
func (m *Token) XXX_DiscardUnknown()
func (*Token) XXX_Marshal ¶
func (*Token) XXX_Unmarshal ¶
type TokenValid ¶
type TokenValid struct { Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TokenValid) Descriptor ¶
func (*TokenValid) Descriptor() ([]byte, []int)
func (*TokenValid) GetValid ¶
func (m *TokenValid) GetValid() bool
func (*TokenValid) ProtoMessage ¶
func (*TokenValid) ProtoMessage()
func (*TokenValid) Reset ¶
func (m *TokenValid) Reset()
func (*TokenValid) String ¶
func (m *TokenValid) String() string
func (*TokenValid) XXX_DiscardUnknown ¶
func (m *TokenValid) XXX_DiscardUnknown()
func (*TokenValid) XXX_Marshal ¶
func (m *TokenValid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TokenValid) XXX_Merge ¶
func (m *TokenValid) XXX_Merge(src proto.Message)
func (*TokenValid) XXX_Size ¶
func (m *TokenValid) XXX_Size() int
func (*TokenValid) XXX_Unmarshal ¶
func (m *TokenValid) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.