authmanager

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package authmanager provides the authentication manager for the server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func New

func New() *Config

func (*Config) GenerateOauthAuthSession

func (a *Config) GenerateOauthAuthSession(ctx context.Context, w http.ResponseWriter, user *generated.User, oauthRequest models.OauthTokenRequest) (*models.AuthData, error)

GenerateOauthAuthSession creates a new auth session for the oauth user and their default organization id

func (*Config) GenerateUserAuthSession

func (a *Config) GenerateUserAuthSession(ctx echo.Context, user *generated.User) (*models.AuthData, error)

generateNewAuthSession creates a new auth session for the user and their default organization id

func (*Config) GenerateUserAuthSessionWithOrg

func (a *Config) GenerateUserAuthSessionWithOrg(ctx echo.Context, user *generated.User, targetOrgID string) (*models.AuthData, error)

generateUserAuthSessionWithOrg creates a new auth session for the user and the new target organization id

func (*Config) GetSessionConfig

func (a *Config) GetSessionConfig() *sessions.SessionConfig

func (*Config) GetTokenManager

func (a *Config) GetTokenManager() *tokens.TokenManager

func (*Config) SetSessionConfig

func (a *Config) SetSessionConfig(sc *sessions.SessionConfig)

SetSessionConfig sets the session config for the auth session

func (*Config) SetTokenManager

func (a *Config) SetTokenManager(tm *tokens.TokenManager)

SetTokenManager sets the token manager for the auth session

Jump to

Keyboard shortcuts

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