authentications

package
v0.0.0-...-7b45942 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Refresh

func Refresh(
	maxCtxDuration time.Duration,
	svc *service.Service,
) (handler gin.HandlerFunc)

@Tags Authentication @Summary Refresh @Description Request new access token using refresh token. @Router /v1/refresh [post] @Produce application/json @Produce application/msgpack @Header 200 {string} Set-Cookie @Success 200 {object} object{data=object{tokenType=string,accessToken=string}} @Success 201 @Failure 401 {object} object{message=string} @Failure 500 {object} object{message=string}

func SignIn

func SignIn(
	maxCtxDuration time.Duration,
	svc *service.Service,
) (handler gin.HandlerFunc)

@Tags Authentication @Summary Sign In @Description Do the signing in request. @Router /v1/signin [post] @Accept application/json @Accept application/msgpack @Produce application/json @Produce application/msgpack @Param form body object{username=string,password=string} true "Login form" @Header 200 {string} Set-Cookie @Success 200 {object} object{data=object{tokenType=string,accessToken=string}} @Failure 401 {object} object{message=string} @Failure 422 {object} object{message=string} @Failure 500 {object} object{message=string}

func SignOut

func SignOut(
	maxCtxDuration time.Duration,
	svc *service.Service,
) (handler gin.HandlerFunc)

@Tags Authentication @Summary Sign Out @Description Do the signing out request to revoke access token & refresh token. @Router /v1/signout [post] @Security BearerAuth @Produce application/json @Produce application/msgpack @Header 200 {string} Set-Cookie @Success 201 @Failure 401 {object} object{message=string} @Failure 500 {object} object{message=string}

func SignUp

func SignUp(
	maxCtxDuration time.Duration,
	svc *service.Service,
) (handler gin.HandlerFunc)

Types

This section is empty.

Jump to

Keyboard shortcuts

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