Documentation
¶
Overview ¶
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- type AuthorizationResponse
- type LoginParameters
- type LoginResponse
- func ClientCredentialsLogin(p LoginParameters) (LoginResponse, error)
- func CredentialsLogout(p LoginParameters) (LoginResponse, error)
- func RefreshUserToken(p RefreshParameters) (LoginResponse, error)
- func UserCredentialsLogin(p LoginParameters, webserverIP string, webserverPort string) (LoginResponse, error)
- type RefreshParameters
- type UserAuthorizationQueryResponse
- type ValidateResponse
Constants ¶
View Source
const ClientCredentialsURL = "https://id.twitch.tv/oauth2/token?grant_type=client_credentials"
View Source
const RefreshTokenURL = "https://id.twitch.tv/oauth2/token?grant_type=refresh_token"
View Source
const RevokeTokenURL = "https://id.twitch.tv/oauth2/revoke"
View Source
const UserAuthorizeURL = "https://id.twitch.tv/oauth2/authorize?response_type=code"
View Source
const UserCredentialsURL = "https://id.twitch.tv/oauth2/token?grant_type=authorization_code"
View Source
const ValidateTokenURL = "https://id.twitch.tv/oauth2/validate"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizationResponse ¶
type LoginParameters ¶
type LoginResponse ¶
type LoginResponse struct {
Response AuthorizationResponse
ExpiresAt time.Time
}
func ClientCredentialsLogin ¶
func ClientCredentialsLogin(p LoginParameters) (LoginResponse, error)
func CredentialsLogout ¶
func CredentialsLogout(p LoginParameters) (LoginResponse, error)
func RefreshUserToken ¶
func RefreshUserToken(p RefreshParameters) (LoginResponse, error)
func UserCredentialsLogin ¶
func UserCredentialsLogin(p LoginParameters, webserverIP string, webserverPort string) (LoginResponse, error)
type RefreshParameters ¶
type ValidateResponse ¶ added in v1.1.21
type ValidateResponse struct {
ClientID string `json:"client_id"`
UserLogin string `json:"login"`
UserID string `json:"user_id"`
Scopes []string `json:"scopes"`
ExpiresIn int64 `json:"expires_in"`
}
func ValidateCredentials ¶ added in v1.1.21
func ValidateCredentials(p LoginParameters) (ValidateResponse, error)
Click to show internal directories.
Click to hide internal directories.