Documentation ¶
Index ¶
- Constants
- type AccessClaims
- type AuthTokens
- type RefreshClaims
- type Server
- func (s *Server) CheckTokenExistence(ctx context.Context, req *jwt_gRPC.CheckTokenExistenceRequest) (*jwt_gRPC.CheckTokenExistenceResponse, error)
- func (s *Server) CreateTokens(ctx context.Context, req *jwt_gRPC.CreateTokensRequest) (*jwt_gRPC.CreateTokensResponse, error)
- func (s *Server) GetUserId(ctx context.Context, req *jwt_gRPC.GetUserIdRequest) (*jwt_gRPC.GetUserIdResponse, error)
- func (s *Server) RefreshTokens(ctx context.Context, req *jwt_gRPC.RefreshTokensRequest) (*jwt_gRPC.RefreshTokenResponse, error)
- func (s *Server) RevokeTokens(ctx context.Context, req *jwt_gRPC.RevokeTokensRequest) (*jwt_gRPC.RevokeTokensResponse, error)
- type UserClaims
Constants ¶
View Source
const ( TRACE_NAME = "server" ERROR_StoreTokenToRedis = "cannot store token to redis: %v" ERROR_MakeAccessToken = "make access token: %v" ERROR_MakeRefreshToken = "make refresh token: %v" ERROR_RefreshTokenNotFound = "refresh token not found" ERROR_TokenNotFound = "token not found" ERROR_ProvideAnyField = "provide any field" ERROR_CannotDeleteTokenFromRedis = "cannot delete token from redis. Error: %v" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessClaims ¶
type AccessClaims struct { UUID string `json:"session"` UserClaims UserClaims `json:"user_claims"` jwt.RegisteredClaims }
type AuthTokens ¶
type RefreshClaims ¶
type RefreshClaims struct { AccessUUID string `json:"access_uuid"` RefreshUUID string `json:"refresh_uuid"` UserClaims UserClaims `json:"user_claims"` jwt.RegisteredClaims }
type Server ¶
type Server struct { jwt_gRPC.UnimplementedAuthenticationServer // contains filtered or unexported fields }
func (*Server) CheckTokenExistence ¶
func (s *Server) CheckTokenExistence(ctx context.Context, req *jwt_gRPC.CheckTokenExistenceRequest) (*jwt_gRPC.CheckTokenExistenceResponse, error)
func (*Server) CreateTokens ¶
func (s *Server) CreateTokens(ctx context.Context, req *jwt_gRPC.CreateTokensRequest) (*jwt_gRPC.CreateTokensResponse, error)
func (*Server) GetUserId ¶
func (s *Server) GetUserId(ctx context.Context, req *jwt_gRPC.GetUserIdRequest) (*jwt_gRPC.GetUserIdResponse, error)
func (*Server) RefreshTokens ¶
func (s *Server) RefreshTokens(ctx context.Context, req *jwt_gRPC.RefreshTokensRequest) (*jwt_gRPC.RefreshTokenResponse, error)
func (*Server) RevokeTokens ¶
func (s *Server) RevokeTokens(ctx context.Context, req *jwt_gRPC.RevokeTokensRequest) (*jwt_gRPC.RevokeTokensResponse, error)
type UserClaims ¶
Click to show internal directories.
Click to hide internal directories.