Documentation ¶
Index ¶
- func RegisterJWTServer(s *grpc.Server, srv JWTServer)
- 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 JWTClient
- 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 JWTServer
- 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
- type UnimplementedJWTServer
- func (*UnimplementedJWTServer) AccessAndRefreshTokens(ctx context.Context, req *JWTData) (*AccessAndRefreshToken, error)
- func (*UnimplementedJWTServer) FreshToken(ctx context.Context, req *JWTData) (*Token, error)
- func (*UnimplementedJWTServer) RefreshTokens(ctx context.Context, req *Token) (*AccessAndRefreshToken, error)
- func (*UnimplementedJWTServer) ValidateToken(ctx context.Context, req *Token) (*Claims, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterJWTServer ¶
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 JWTClient ¶
type JWTClient interface { FreshToken(ctx context.Context, in *JWTData, opts ...grpc.CallOption) (*Token, error) AccessAndRefreshTokens(ctx context.Context, in *JWTData, opts ...grpc.CallOption) (*AccessAndRefreshToken, error) RefreshTokens(ctx context.Context, in *Token, opts ...grpc.CallOption) (*AccessAndRefreshToken, error) ValidateToken(ctx context.Context, in *Token, opts ...grpc.CallOption) (*Claims, error) }
JWTClient is the client API for JWT service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewJWTClient ¶
func NewJWTClient(cc *grpc.ClientConn) JWTClient
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 JWTServer ¶
type JWTServer interface { FreshToken(context.Context, *JWTData) (*Token, error) AccessAndRefreshTokens(context.Context, *JWTData) (*AccessAndRefreshToken, error) RefreshTokens(context.Context, *Token) (*AccessAndRefreshToken, error) ValidateToken(context.Context, *Token) (*Claims, error) }
JWTServer is the server API for JWT service.
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
type UnimplementedJWTServer ¶
type UnimplementedJWTServer struct { }
UnimplementedJWTServer can be embedded to have forward compatible implementations.
func (*UnimplementedJWTServer) AccessAndRefreshTokens ¶
func (*UnimplementedJWTServer) AccessAndRefreshTokens(ctx context.Context, req *JWTData) (*AccessAndRefreshToken, error)
func (*UnimplementedJWTServer) FreshToken ¶
func (*UnimplementedJWTServer) RefreshTokens ¶
func (*UnimplementedJWTServer) RefreshTokens(ctx context.Context, req *Token) (*AccessAndRefreshToken, error)
func (*UnimplementedJWTServer) ValidateToken ¶
Click to show internal directories.
Click to hide internal directories.