oauth2

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Oauth

type Oauth struct {
	Config core.ConfigInterface
}

func New

func New(ctx context.Context, config core.ConfigInterface) *Oauth

func (*Oauth) AuthCodeURL

func (s *Oauth) AuthCodeURL(ctx context.Context, state ...string) string

Redirect user to consent page to ask for permission for the scopes specified above. Visit or Redirect to the url

func (*Oauth) Scope

func (s *Oauth) Scope(scopes []string) *Oauth

func (*Oauth) UserFromCode

func (s *Oauth) UserFromCode(ctx context.Context, code string) (user *core.User, err error)

Directories

Path Synopsis
client

Jump to

Keyboard shortcuts

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