server

package
v0.0.0-...-be022e4 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ClientIDEnv = "AUTH_CLIENT_ID"

ClientIDEnv Enviroment varaible name for ClientID

View Source
const ClientSecretEnv = "AUTH_CLIENT_SECRET"

ClientSecretEnv Enviroment varaible name for ClientSecret

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthQuery

type AuthQuery struct {
	ClientID     string `form:"client_id" binding:"required"`
	RedirectURI  string `form:"redirect_uri" binding:"required"`
	State        string `form:"state" binding:"required"`
	Scope        string `form:"scope"`
	ResponseType string `form:"response_type" binding:"required"`
	UserLocale   string `form:"user_locale"`
}

AuthQuery sent by google

type Server

type Server struct {
	Router *gin.Engine
	// contains filtered or unexported fields
}

Server hold root server state

func NewServer

func NewServer(db *database.Database) *Server

NewServer creates server, it won't run till Server.Start

type TokenQuery

type TokenQuery struct {
	ClientID     string `form:"client_id" binding:"required"`
	ClientSecret string `form:"client_secret" binding:"required"`
	GrantType    string `form:"grant_type" binding:"required"`
	Code         string `form:"code" binding:"required_if=GrantType authorization_code"`
	RedirectURI  string `form:"redirect_uri" binding:"required_if=GrantType authorization_code"`
	RefreshToken string `form:"refresh_token" binding:"required_if=GrantType refresh_token"`
}

TokenQuery sent by google

Jump to

Keyboard shortcuts

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