oauth

package
v0.0.0-...-54d343b Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Github         *oauth2.Config
	Gitlab         *oauth2.Config
	JWTKey         []byte
	State          string
	UserID         uint
	JWTRedirectURL string
}

Config -

func New

func New() (Config, error)

New -

func (Config) GetIDFromToken

func (c Config) GetIDFromToken(token string) (uint, error)

GetIDFromToken -

func (Config) MakeJWT

func (c Config) MakeJWT(userID uint) (string, error)

MakeJWT -

type InitConfig

type InitConfig struct {
	GithubCallbackURL string `json:"githubCallbackURL"`
	GitlabCallbackURL string `json:"gitlabCallbackURL"`
	JwtRedirectURL    string `json:"jwtRedirectURL"`
}

InitConfig -

Jump to

Keyboard shortcuts

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