Documentation
¶
Index ¶
- type Ganb
- func (g Ganb) OAuthAuthorization(sessionID string, scope string, redirectURI string) string
- func (g Ganb) OAuthGetToken(redirectURI string, code string, authMethod string) (Token, error)
- func (g Ganb) OpenIDAuthorization(sessionID string, scope string, redirectURI string) (string, error)
- func (g Ganb) OpenIDGetToken(redirectURI string, code string, authMethod string) (Token, error)
- func (g Ganb) RefreshTokens(refreshToken string) (Token, error)
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ganb ¶
type Ganb struct {
// contains filtered or unexported fields
}
Ganb is our main struct
func New ¶
func New(clientID string, clientSecret string, nonceSave func(string) error, nonceCheck func(string) error) (Ganb, error)
New setup the lib
func (Ganb) OAuthAuthorization ¶
OAuthAuthorization methods Authorization used with oAuth
func (Ganb) OAuthGetToken ¶
OAuthGetToken methods used with oAuth
func (Ganb) OpenIDAuthorization ¶
func (g Ganb) OpenIDAuthorization(sessionID string, scope string, redirectURI string) (string, error)
OpenIDAuthorization methods Authorization used with OpenID
func (Ganb) OpenIDGetToken ¶
OpenIDGetToken methods used with OpenID
type Token ¶
type Token struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` Scope string `json:"scope,omitempty"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` IDToken string `json:"id_token,omitempty"` Error string `json:"error"` ErrorDescription string `json:"error_description"` ErrorUri string `json:"error_uri"` }
Token data sctucture for both oAuth and openID tokens
Click to show internal directories.
Click to hide internal directories.