auth

package
v5.4.39 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "Auth"

ModuleName contains the name of this module

Variables

View Source
var ErrMissingPublicURL = errors.New("auth.publicurl must be set in strictmode")

ErrMissingPublicURL is returned when the publicUrl is missing from the config

Functions

This section is empty.

Types

type Auth

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

Auth is the main struct of the Auth service

func NewAuthInstance

func NewAuthInstance(config Config, registry didstore.Store, vcr vcr.VCR, keyStore crypto.KeyStore, serviceResolver didman.CompoundServiceResolver, jsonldManager jsonld.JSONLD, pkiProvider pki.Provider) *Auth

NewAuthInstance accepts a Config with several Nuts Engines and returns an instance of Auth

func (*Auth) AuthzServer

func (auth *Auth) AuthzServer() oauth.AuthorizationServer

AuthzServer returns the oauth.AuthorizationServer

func (*Auth) Config

func (auth *Auth) Config() interface{}

Config returns the actual config of the module.

func (*Auth) Configure

func (auth *Auth) Configure(config core.ServerConfig) error

Configure the Auth struct by creating a validator and create an Irma server

func (*Auth) ContractNotary

func (auth *Auth) ContractNotary() services.ContractNotary

ContractNotary returns an implementation of the ContractNotary interface.

func (*Auth) Name

func (auth *Auth) Name() string

Name returns the name of the module.

func (*Auth) RelyingParty

func (auth *Auth) RelyingParty() oauth.RelyingParty

RelyingParty returns the oauth.RelyingParty

func (*Auth) Shutdown

func (auth *Auth) Shutdown() error

Shutdown stops the Auth engine

func (*Auth) Start

func (auth *Auth) Start() error

Start starts the Auth engine (Noop)

type AuthenticationServices

type AuthenticationServices interface {
	// AuthzServer returns the oauth.AuthorizationServer
	AuthzServer() oauth.AuthorizationServer
	// RelyingParty returns the oauth.RelyingParty
	RelyingParty() oauth.RelyingParty
	// ContractNotary returns an instance of ContractNotary
	ContractNotary() services.ContractNotary
}

AuthenticationServices is the interface which should be implemented for clients or mocks

type Config

type Config struct {
	Irma                IrmaConfig `koanf:"irma"`
	HTTPTimeout         int        `koanf:"http.timeout"`
	PublicURL           string     `koanf:"publicurl"`
	ClockSkew           int        `koanf:"clockskew"`
	ContractValidators  []string   `koanf:"contractvalidators"`
	AccessTokenLifeSpan int        `koanf:"accesstokenlifespan"`
}

Config holds all the configuration params

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns an instance of Config with the default values.

func TestConfig

func TestConfig() Config

type IrmaConfig

type IrmaConfig struct {
	SchemeManager     string `koanf:"schememanager"`
	AutoUpdateSchemas bool   `koanf:"autoupdateschemas"`
}

Directories

Path Synopsis
api
auth/v1
Package v1 provides primitives to interact with the openapi HTTP API.
Package v1 provides primitives to interact with the openapi HTTP API.
auth/v1/client
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.
Package contract is a generated GoMock package.
Package contract is a generated GoMock package.
Package services is a generated GoMock package.
Package services is a generated GoMock package.
oauth
Package oauth is a generated GoMock package.
Package oauth is a generated GoMock package.
selfsigned/types
Package types is a generated GoMock package.
Package types is a generated GoMock package.
selfsigned/web
Package web provides primitives to interact with the openapi HTTP API.
Package web provides primitives to interact with the openapi HTTP API.
uzi

Jump to

Keyboard shortcuts

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