login

package
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

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

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"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationResponse

type AuthorizationResponse struct {
	AccessToken  string   `json:"access_token"`
	RefreshToken string   `json:"refresh_token"`
	ExpiresIn    int64    `json:"expires_in"`
	Scope        []string `json:"scope"`
	TokenType    string   `json:"token_type"`
}

type LoginParameters

type LoginParameters struct {
	ClientID     string
	ClientSecret string
	Scopes       string
	Token        string
	URL          string
	RedirectURL  string
	AuthorizeURL string
}

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) (LoginResponse, error)

type RefreshParameters

type RefreshParameters struct {
	ClientID     string
	ClientSecret string
	RefreshToken string
	URL          string
}

type UserAuthorizationQueryResponse

type UserAuthorizationQueryResponse struct {
	Code  string
	State string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL