Versions in this module Expand all Collapse all v0 v0.6.1 May 7, 2021 v0.6.0 Apr 21, 2021 v0.5.1 Apr 21, 2021 v0.5.0 Apr 19, 2021 Changes in this version + const APIEndpointAuthBase + const APIEndpointAuthorize + const APIEndpointBase + const APIEndpointGetFriendshipStratus + const APIEndpointGetUserProfile + const APIEndpointRevokeToken + const APIEndpointToken + const APIEndpointTokenVerify + var ErrInvalidSignature = errors.New("invalid signature") + func GenerateCodeVerifier(length int) string + func GenerateNonce() string + func PkceChallenge(verifier string) string + type APIError struct + Code int + Response *ErrorResponse + func (e *APIError) Error() string + type AuthRequestOptions struct + BotPrompt string + MaxAge int + Nonce string + Prompt string + UILocales string + type BasicResponse struct + type Client struct + func New(channelID, channelSecret string, options ...ClientOption) (*Client, error) + func (client *Client) GetAccessToken(redirectURL, code string) *GetAccessTokenCall + func (client *Client) GetAccessTokenPKCE(redirectURL, code, codeVerifier string) *GetAccessTokenPKCECall + func (client *Client) GetFriendshipStatus(accessToken string) *GetFriendshipStatusCall + func (client *Client) GetPKCEWebLoinURL(redirectURL string, state string, scope string, codeChallenge string, ...) string + func (client *Client) GetUserProfile(accessToken string) *GetUserProfileCall + func (client *Client) GetWebLoinURL(redirectURL string, state string, scope string, options AuthRequestOptions) string + func (client *Client) RefreshToken(refreshToken string) *RefreshTokenCall + func (client *Client) RevokeToken(accessToken string) *RevokeTokenCall + func (client *Client) TokenVerify(accessToken string) *TokenVerifyCall + type ClientOption func(*Client) error + func WithEndpointBase(endpointBase string) ClientOption + func WithHTTPClient(c *http.Client) ClientOption + type ErrorResponse struct + Details []errorResponseDetail + Message string + type GetAccessTokenCall struct + func (call *GetAccessTokenCall) Do() (*TokenResponse, error) + func (call *GetAccessTokenCall) WithContext(ctx context.Context) *GetAccessTokenCall + type GetAccessTokenPKCECall struct + func (call *GetAccessTokenPKCECall) Do() (*TokenResponse, error) + func (call *GetAccessTokenPKCECall) WithContext(ctx context.Context) *GetAccessTokenPKCECall + type GetFriendshipStatusCall struct + func (call *GetFriendshipStatusCall) Do() (*GetFriendshipStatusResponse, error) + func (call *GetFriendshipStatusCall) WithContext(ctx context.Context) *GetFriendshipStatusCall + type GetFriendshipStatusResponse struct + FriendFlag bool + type GetUserProfileCall struct + func (call *GetUserProfileCall) Do() (*GetUserProfileResponse, error) + func (call *GetUserProfileCall) WithContext(ctx context.Context) *GetUserProfileCall + type GetUserProfileResponse struct + DisplayName string + PictureURL string + StatusMessage string + UserID string + type Payload struct + Amr []string + Aud string + AuthTime int + Email string + Exp int + Iat int + Iss string + Name string + Nonce string + Picture string + Sub string + type RefreshTokenCall struct + func (call *RefreshTokenCall) Do() (*TokenRefreshResponse, error) + func (call *RefreshTokenCall) WithContext(ctx context.Context) *RefreshTokenCall + type RevokeTokenCall struct + func (call *RevokeTokenCall) Do() (*BasicResponse, error) + func (call *RevokeTokenCall) WithContext(ctx context.Context) *RevokeTokenCall + type TokenRefreshResponse struct + AccessToken string + ExpiresIn int + RefreshToken string + Scope string + TokenType string + type TokenResponse struct + AccessToken string + ExpiresIn int + IDToken string + RefreshToken string + Scope string + TokenType string + func (t TokenResponse) DecodePayload(channelID string) (*Payload, error) + type TokenVerifyCall struct + func (call *TokenVerifyCall) Do() (*TokenVerifyResponse, error) + func (call *TokenVerifyCall) WithContext(ctx context.Context) *TokenVerifyCall + type TokenVerifyResponse struct + ClientID string + ExpiresIn int + Scope string + type UserProfileResponse struct + DisplayName string + PictureURL string + StatusMessage string + UserID string