sessions

package
v0.0.0-...-cbce884 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetRoutes

func SetRoutes(engine *gin.Engine, datastore interfaces.Datastore, config *config.AppConfig) error

SetRoutes sets all of the appropriate routes to handlers for project sessions

Types

type Sessions

type Sessions struct {
	// contains filtered or unexported fields
}

Sessions wraps the datastore and any HTTP handlers for project user sessions

func New

func New(db interfaces.Datastore, config *config.AppConfig) *Sessions

New returns a pointer to a new `Users` struct

func (*Sessions) CreateSession

func (s *Sessions) CreateSession(c *gin.Context)

CreateSession creates a new project user session

func (*Sessions) ListSessions

func (s *Sessions) ListSessions(c *gin.Context)

ListSessions lists all active user sessions for a project

func (*Sessions) RefreshSession

func (s *Sessions) RefreshSession(c *gin.Context)

RefreshSession uses the refresh token to generate a new access token

func (*Sessions) RevokeSession

func (s *Sessions) RevokeSession(c *gin.Context)

RevokeSession deletes a session from the project collection

Jump to

Keyboard shortcuts

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