oauth

package
v0.0.0-...-687c1ae Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID     string
	Secret string
	Domain string
}

Client is a config for upmaster-agent

type Config

type Config struct {
	DB         *gorm.DB
	DBName     string
	GCInterval int
	JWTKey     []byte
	Clients    []Client /* A list of 'Client'. Since agents can shared same client credentials,
	the length of this list will probably always be one */
}

Config is the configuration required to create a Server

type Server

type Server struct {
	Config Config // Config is stored here incase needed
	Server *server.Server
	// contains filtered or unexported fields
}

Server is a object of OAuth Server

func NewServer

func NewServer(c Config) (*Server, error)

NewServer generates a Server instance

func (*Server) RegisterRoute

func (s *Server) RegisterRoute(router *gin.RouterGroup)

RegisterRoute register th OAuth routes to router

Jump to

Keyboard shortcuts

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