Documentation ¶
Index ¶
- func ValidateScopes(claims jwt.MapClaims, scheme *JWTScheme) error
- type JWTScheme
- type Service
- type UserService
- func (s *UserService) Info(res http.ResponseWriter, req *http.Request)
- func (s *UserService) JWTAuth(handler http.HandlerFunc) http.HandlerFunc
- func (s *UserService) NewRefreshToken(res http.ResponseWriter, req *http.Request)
- func (s *UserService) RefreshAccessToken(res http.ResponseWriter, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JWTScheme ¶
type Service ¶
type Service interface { Info(res http.ResponseWriter, req *http.Request) RefreshAccessToken(res http.ResponseWriter, req *http.Request) NewRefreshToken(res http.ResponseWriter, req *http.Request) }
type UserService ¶
type UserService struct { app.Service JwtConfig *app.JWTConfig // contains filtered or unexported fields }
func (*UserService) Info ¶
func (s *UserService) Info(res http.ResponseWriter, req *http.Request)
Get the user Info
func (*UserService) JWTAuth ¶
func (s *UserService) JWTAuth(handler http.HandlerFunc) http.HandlerFunc
JWTAuth acts as middleware and implements the authorization logic for services.
func (*UserService) NewRefreshToken ¶
func (s *UserService) NewRefreshToken(res http.ResponseWriter, req *http.Request)
func (*UserService) RefreshAccessToken ¶
func (s *UserService) RefreshAccessToken(res http.ResponseWriter, req *http.Request)
Refreshes the access token of User
Click to show internal directories.
Click to hide internal directories.