auth

package
v0.0.0-...-7c4983b Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAServer

type OAServer struct {
	Env string
	// contains filtered or unexported fields
}

func NewOAuthServer

func NewOAuthServer(env, redirectUrl, clientId, clientSecret string, secret []byte) (*OAServer, error)

func (*OAServer) Exchange

func (s *OAServer) Exchange(code string) (*oauth2.Token, error)

func (*OAServer) NewService

func (s *OAServer) NewService(token *oauth2.Token) (*goauth.Service, error)

func (*OAServer) ParseJWT

func (s *OAServer) ParseJWT(token string) (jwt.MapClaims, error)

func (*OAServer) SignJWTs

func (s *OAServer) SignJWTs(userInfo *goauth.Userinfo, code string) (string, string, error)

type User

type User struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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