Documentation ¶
Index ¶
- type JWTClient
- func (jwtClient JWTClient) AccessAndRefreshTokens(userIdentity string, scopes []string) (string, string, string, error)
- func (jwtClient JWTClient) FreshToken(userIdentity string) (string, error)
- func (jwtClient *JWTClient) Init(service micro.Service)
- func (jwtClient JWTClient) RefreshTokens(refreshToken string) (string, string, string, error)
- func (jwtClient JWTClient) ValidateToken(token, tokenType string) (bool, string, []string, error)
- type UsersClient
- func (usersClient UsersClient) Add(mainData config.UserMain, extraData config.UserExtra) (string, string, error)
- func (usersClient UsersClient) Auth(username, password string) (string, string, error)
- func (usersClient UsersClient) Get(userID string) (config.UserMain, string, error)
- func (usersClient *UsersClient) Init(service micro.Service)
- func (usersClient UsersClient) Update(userID string, update config.UserMain) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTClient ¶
type JWTClient struct {
// contains filtered or unexported fields
}
JWTClient is jwt service client
func NewJWTClient ¶ added in v0.1.0
NewJWTClient is used to make a JWT Client
func (JWTClient) AccessAndRefreshTokens ¶ added in v0.1.0
func (jwtClient JWTClient) AccessAndRefreshTokens( userIdentity string, scopes []string) (string, string, string, error)
AccessAndRefreshTokens is used create access and refresh tokens
func (JWTClient) FreshToken ¶ added in v0.1.0
FreshToken is used to create a fresh access token
func (JWTClient) RefreshTokens ¶ added in v0.1.0
RefreshTokens is used to create access and refresh token based on previous refresh token
type UsersClient ¶ added in v0.1.0
type UsersClient struct {
// contains filtered or unexported fields
}
UsersClient is used to communicate with users service
func NewUsersClient ¶ added in v0.1.0
func NewUsersClient(service micro.Service) UsersClient
NewUsersClient is used to get users client struct
func (UsersClient) Add ¶ added in v0.1.0
func (usersClient UsersClient) Add( mainData config.UserMain, extraData config.UserExtra) (string, string, error)
Add is used to add a user
func (UsersClient) Auth ¶ added in v0.1.0
func (usersClient UsersClient) Auth(username, password string) (string, string, error)
Auth is used to authenticate a user
func (*UsersClient) Init ¶ added in v0.1.0
func (usersClient *UsersClient) Init(service micro.Service)
Init is used to initialise client
Click to show internal directories.
Click to hide internal directories.