Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TokenURL is the URL from where access tokens for the Site24x7 API are // obtained. TokenURL = "https://accounts.zoho.com/oauth/v2/token" // TokenType is the type used in the Authorization header next to the // access token. TokenType = "Zoho-oauthtoken" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { *oauth2.Config // RefreshToken is a token that's used by the application // (as opposed to the user) to refresh the access token // if it expires. RefreshToken string }
Config is an OAuth config that is also aware of the refresh token.
func (*Config) Client ¶
Client returns a *http.Client which automatically retrieves OAuth access tokens and attaches them to any request made with it.
func (*Config) TokenSource ¶
func (c *Config) TokenSource(ctx context.Context) oauth2.TokenSource
TokenSource creates an oauth2.TokenSource which obtains access tokens using the refresh token.
Click to show internal directories.
Click to hide internal directories.