login

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	Error error
}

Jump to

Keyboard shortcuts

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