auth

package
v0.0.0-...-9d6c436 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const TWITCH_CSRF_COOKIE_NAME = "csrf_token_tw"

Variables

This section is empty.

Functions

func New

func New(gCtx global.Context) rest.Route

Types

type OAuth2AuthorizationParams

type OAuth2AuthorizationParams struct {
	ClientID     string `url:"client_id"`
	ClientSecret string `url:"client_secret"`
	RedirectURI  string `url:"redirect_uri"`
	Code         string `url:"code"`
	GrantType    string `url:"grant_type"`
}

type OAuth2AuthorizedResponse

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

type OAuth2CallbackAppParams

type OAuth2CallbackAppParams struct {
	Token string `url:"token"`
}

type OAuth2URLParams

type OAuth2URLParams struct {
	ClientID     string `url:"client_id"`
	RedirectURI  string `url:"redirect_uri"`
	ResponseType string `url:"response_type"`
	Scope        string `url:"scope"`
	State        string `url:"state"`
}

type Route

type Route struct {
	Ctx global.Context
}

func (*Route) Config

func (r *Route) Config() rest.RouteConfig

func (*Route) Handler

func (r *Route) Handler(ctx *rest.Ctx) rest.APIError

Jump to

Keyboard shortcuts

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