auth

package
v0.0.0-...-c52fe67 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	SessionService service.SessionService
	UserService    srv.UserService
	Env            *env.Env
	View           View
}

func New

func New(params Params) *Handler

func (Handler) Callback

func (h Handler) Callback(c echo.Context) error

func (Handler) Login

func (h Handler) Login(c echo.Context) error

swagger:route GET /auth/login auth

Start authentication process.

This endpoint will redirect unauthenticated user to SSO and will redirect authenticated user to root.

Responses:
  302:
  500: HTTPError

func (Handler) Logout

func (h Handler) Logout(c echo.Context) error

swagger:route GET /auth/logout auth

Terminate current user session.

This endpoint will redirect user to SSO to logout and SSO will redirect user back to root.

Responses:
  302:
  500: HTTPError

func (Handler) LogoutCallback

func (h Handler) LogoutCallback(c echo.Context) error

func (Handler) Middleware

func (h Handler) Middleware(next echo.HandlerFunc) echo.HandlerFunc

func (Handler) Profile

func (h Handler) Profile(c echo.Context) error

swagger:route GET /auth/profile auth

Get current user profile.

This endpoint will return user profile in current session.

Responses:
  200: Profile
  401: HTTPError
  500: HTTPError

type Params

type Params struct {
	fx.In

	SessionService service.SessionService
	UserService    srv.UserService
	Env            *env.Env
}

type View

type View struct{}

Jump to

Keyboard shortcuts

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