auth

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwsSession

func AwsSession(appName string) (*session.Session, error)

func GetConsoleURL

func GetConsoleURL(sess *session.Session, destinationURL string) (*string, error)

GetConsoleURL - Returns the sign-in URL

func Logout

func Logout() error

func WhoAmI

func WhoAmI() (*string, error)

Types

type AppRole

type AppRole struct {
	RoleARN   string `json:"role_arn"`
	AccountID string `json:"account_id"`
	AppName   string `json:"name"`
	Region    string `json:"region"`
}

func AppList

func AppList() ([]*AppRole, error)

type DeviceCodeResp

type DeviceCodeResp struct {
	DeviceCode              string `json:"device_code"`
	ExpiresIn               int    `json:"expires_in"`
	UserCode                string `json:"user_code"`
	VerificationURI         string `json:"verification_uri"`
	Interval                int    `json:"interval"`
	VerificationURIComplete string `json:"verification_uri_complete"`
}

func LoginInit

func LoginInit() (*DeviceCodeResp, error)

LoginInit start login process with Auth0

type Tokens

type Tokens struct {
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	IDToken      string `json:"id_token"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
	TokenType    string `json:"token_type"`
}

type UserInfo

type UserInfo struct {
	Email string    `json:"email"`
	Apps  []AppRole `json:"https://apppack.io/apps"`
}

func LoginComplete

func LoginComplete(deviceCode string) (*UserInfo, error)

Jump to

Keyboard shortcuts

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