auth

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(res http.ResponseWriter, req *http.Request)

Auth performs the authentication of users swagger:route POST /auth auth authAPIRequest Consumes: - application/json Produces: - application/json responses:

200: authAPIResponse
default: Error

func AuthURL

func AuthURL(res http.ResponseWriter, req *http.Request)

AuthURL generates the OAuth2 url needed to login swagger:route GET /auth-url auth authURLAPIRequest Consumes: - application/json Produces: - application/json responses:

200: authURLAPIResponse
default: Error

func GetUserFromRequest added in v1.8.5

func GetUserFromRequest(req *http.Request) (*userutils.User, error)

func Logout

func Logout(res http.ResponseWriter, req *http.Request)

Logout performs the logout of the users swagger:route GET /logout auth logout Consumes: - application/json Produces: - application/json responses:

200: authAPIResponse
default: Error

func Middleware added in v1.8.5

func Middleware(next http.Handler) http.Handler

Types

type UserContextKey added in v1.8.5

type UserContextKey struct{}

Jump to

Keyboard shortcuts

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