auth

package
v0.0.0-...-42dca6d Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2018 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 Auth

type Auth struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Auth contains the auth sessions

func New

func New() *Auth

New auth

func (*Auth) Authorize

func (a *Auth) Authorize(c *gin.Context)

Authorize adds a new authorization cookie

func (*Auth) AuthorizeGoogleOauth2

func (a *Auth) AuthorizeGoogleOauth2(c *gin.Context, oauthToken string) error

AuthorizeGoogleOauth2 adds new autorization cookie from a oauth token

func (*Auth) IsAuthorized

func (a *Auth) IsAuthorized(c *gin.Context) bool

IsAuthorized returns if the http context contains a valid cookie

Jump to

Keyboard shortcuts

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