Documentation
¶
Index ¶
- type AuthClient
- func (a *AuthClient) GetUserId(body GetUserIdRequest) (*string, error)
- func (a *AuthClient) Refresh(body RefreshRequest) (*RefreshResponse, error)
- func (a *AuthClient) Revoke(body RevokeRequest) (*bool, error)
- func (a *AuthClient) Tokens(body TokensRequest) (*TokenResponse, error)
- func (a *AuthClient) Validate(body ValidateRequest) (*ValidateResponse, error)
- type AuthResponse
- type Endpoint
- type EndpointName
- type GetUserIdRequest
- type GetUserIdResponse
- type RefreshRequest
- type RefreshResponse
- type RevokeRequest
- type RevokeResponse
- type TokenResponse
- type TokensRequest
- type ValidateRequest
- type ValidateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClient ¶
type AuthClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(host string) (*AuthClient, error)
func (*AuthClient) GetUserId ¶
func (a *AuthClient) GetUserId(body GetUserIdRequest) (*string, error)
func (*AuthClient) Refresh ¶
func (a *AuthClient) Refresh(body RefreshRequest) (*RefreshResponse, error)
func (*AuthClient) Revoke ¶
func (a *AuthClient) Revoke(body RevokeRequest) (*bool, error)
func (*AuthClient) Tokens ¶
func (a *AuthClient) Tokens(body TokensRequest) (*TokenResponse, error)
func (*AuthClient) Validate ¶
func (a *AuthClient) Validate(body ValidateRequest) (*ValidateResponse, error)
type AuthResponse ¶
type EndpointName ¶
type EndpointName string
const ( E_TOKEN EndpointName = "token" E_VALIDATE EndpointName = "validate" E_REFRESH EndpointName = "refresh" E_USER_ID EndpointName = "user-id" E_REVOKE EndpointName = "revoke" )
type GetUserIdRequest ¶
type GetUserIdRequest struct {
AccessToken string `json:"access_token"`
}
type GetUserIdResponse ¶
type GetUserIdResponse string
type RefreshRequest ¶
type RefreshRequest struct {
RefreshToken string `json:"refresh_token"`
}
type RefreshResponse ¶
type RevokeRequest ¶
type RevokeRequest struct {
RefreshToken string `json:"refresh_token"`
}
type RevokeResponse ¶
type RevokeResponse bool
type TokenResponse ¶
type TokensRequest ¶
type ValidateRequest ¶
type ValidateResponse ¶
Click to show internal directories.
Click to hide internal directories.