auth

package
v0.0.0-...-281f868 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {
	ClientID            string `json:"client_id"`
	Scope               string `json:"scope"`
	ResponseType        string `json:"response_type"`
	RedirectURL         string `json:"redirect_url"`
	Audience            string `json:"audience"`
	Prompt              string `json:"prompt"`
	State               string `json:"state"`
	CodeChallenge       string `json:"code_challenge"`
	CodeChallengeMethod string `json:"code_challenge_method"`
}

func NewAuthDetails

func NewAuthDetails(challenge string) AuthRequest

type AuthResult

type AuthResult struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	PUID         string `json:"puid"`
}

type Authenticator

type Authenticator struct {
	EmailAddress       string
	Password           string
	Proxy              string
	Session            tls_client.HttpClient
	UserAgent          string
	State              string
	URL                string
	Verifier_code      string
	Verifier_challenge string
	AuthRequest        AuthRequest
	AuthResult         AuthResult
}

func NewAuthenticator

func NewAuthenticator(emailAddress, password, proxy string) *Authenticator

func (*Authenticator) Begin

func (auth *Authenticator) Begin() *Error

func (*Authenticator) GetAccessToken

func (auth *Authenticator) GetAccessToken() string

func (*Authenticator) GetAuthResult

func (auth *Authenticator) GetAuthResult() AuthResult

func (*Authenticator) GetPUID

func (auth *Authenticator) GetPUID() (string, *Error)

func (*Authenticator) URLEncode

func (auth *Authenticator) URLEncode(str string) string

type Error

type Error struct {
	Location   string
	StatusCode int
	Details    string
	Error      error
}

func NewError

func NewError(location string, statusCode int, details string, err error) *Error

Jump to

Keyboard shortcuts

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