server

package
v0.0.0-...-c58abca Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthenticationMissingCode         = errors.New("error: mitid did not return code")
	ErrAuthenticationStateError          = errors.New("error: provider returned unexpected state")
	ErrAuthenticationIdentityNotFound    = errors.New("error: crm could not match identity")
	ErrAuthenticationIdentityServiceFail = errors.New("error: crm returned error")
	ErrAuthenticationOnboardingSession   = errors.New("error: onbaording sessions data incomplete")
)
View Source
var (
	ErrInvalidSession = errors.New("invalid authentication session")
	ErrInvalidToken   = errors.New("invalid authentication token")
)

Functions

func NewServer

func NewServer(config Config) http.Handler

Types

type Config

type Config struct {
	ENVIRONMENT string `env:"ENVIRONMENT,required"`
	//Mitid Broker
	MITID_CLIENT_ID     string `env:"MITID_CLIENT_ID,required"`
	MITID_CLIENT_SECRET string `env:"MITID_CLIENT_SECRET,required"`
	MITID_BROKER_HOST   string `env:"MITID_BROKER_HOST,required"`
	//Keys
	TOKEN_SIGN_KEY string `env:"TOKEN_SIGN_KEY,required"`
	SESSION_KEY    string `env:"SESSION_KEY,required"`
	//Hosts
	ORIGIN_SERVER string `env:"ORIGIN_SERVER,required"`
	CRM_SERVER    string `env:"CRM_SERVER,required"`
	//Redirects
	POST_LOGIN_REDIRECT        string `env:"POST_LOGIN_REDIRECT"`
	IDENTITY_ERROR_REDIRECT    string `env:"IDENTITY_ERROR_REDIRECT"`
	AUTH_SERVER_ERROR_REDIRECT string `env:"AUTH_SERVER_ERROR_REDIRECT"`
}

Jump to

Keyboard shortcuts

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