auth

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package auth is a generated GoMock package.

Index

Constants

View Source
const JwtBearerGrantType = "urn:ietf:params:oauth:grant-type:jwt-bearer"

JwtBearerGrantType defines the grant-type to use in the access token request

View Source
const ModuleName = "Auth"

ModuleName contains the name of this module

Variables

View Source
var ErrMissingPublicURL = errors.New("missing publicUrl")

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 types.Store, vcr vcr.VCR, keyStore crypto.KeyStore, serviceResolver didman.CompoundServiceResolver) *Auth

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

func NewTestAuthInstance

func NewTestAuthInstance(t *testing.T) *Auth

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) HTTPTimeout

func (auth *Auth) HTTPTimeout() time.Duration

HTTPTimeout returns the HTTP timeout to use for the Auth API HTTP client

func (*Auth) Name

func (auth *Auth) Name() string

Name returns the name of the module.

func (*Auth) OAuthClient

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

OAuthClient returns an instance of OAuthClient

func (*Auth) Shutdown

func (auth *Auth) Shutdown() error

Shutdown stops the CRL validator synchronization loop

func (*Auth) Start

func (auth *Auth) Start() error

Start starts the CRL validator synchronization loop

func (*Auth) TLSConfig

func (auth *Auth) TLSConfig() *tls.Config

TLSConfig returns the TLS configuration when TLS is enabled and nil if it's disabled

type AuthenticationServices

type AuthenticationServices interface {
	// OAuthClient returns an instance of OAuthClient
	OAuthClient() services.OAuthClient
	// ContractNotary returns an instance of ContractNotary
	ContractNotary() services.ContractNotary
	// HTTPTimeout returns the HTTP timeout to use for the Auth API HTTP client
	HTTPTimeout() time.Duration
	// TLSConfig returns the TLS configuration when TLS is enabled and nil if it's disabled
	TLSConfig() *tls.Config
}

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

type Config

type Config struct {
	IrmaSchemeManager     string   `koanf:"auth.irma.schememanager"`
	IrmaAutoUpdateSchemas bool     `koanf:"auth.irma.autoupdateschemas"`
	HTTPTimeout           int      `koanf:"auth.http.timeout"`
	PublicURL             string   `koanf:"auth.publicurl"`
	ClockSkew             int      `koanf:"auth.clockskew"`
	ContractValidators    []string `koanf:"auth.contractvalidators"`
	CertFile              string   `koanf:"network.certfile"`
	CertKeyFile           string   `koanf:"network.certkeyfile"`
	TrustStoreFile        string   `koanf:"network.truststorefile"`
	MaxCRLValidityDays    int      `koanf:"network.maxcrlvaliditydays"`
}

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 MockAuthenticationServices

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

MockAuthenticationServices is a mock of AuthenticationServices interface.

func NewMockAuthenticationServices

func NewMockAuthenticationServices(ctrl *gomock.Controller) *MockAuthenticationServices

NewMockAuthenticationServices creates a new mock instance.

func (*MockAuthenticationServices) ContractNotary

ContractNotary mocks base method.

func (*MockAuthenticationServices) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthenticationServices) HTTPTimeout

func (m *MockAuthenticationServices) HTTPTimeout() time.Duration

HTTPTimeout mocks base method.

func (*MockAuthenticationServices) OAuthClient

OAuthClient mocks base method.

func (*MockAuthenticationServices) TLSConfig

func (m *MockAuthenticationServices) TLSConfig() *tls.Config

TLSConfig mocks base method.

type MockAuthenticationServicesMockRecorder

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

MockAuthenticationServicesMockRecorder is the mock recorder for MockAuthenticationServices.

func (*MockAuthenticationServicesMockRecorder) ContractNotary

func (mr *MockAuthenticationServicesMockRecorder) ContractNotary() *gomock.Call

ContractNotary indicates an expected call of ContractNotary.

func (*MockAuthenticationServicesMockRecorder) HTTPTimeout

HTTPTimeout indicates an expected call of HTTPTimeout.

func (*MockAuthenticationServicesMockRecorder) OAuthClient

OAuthClient indicates an expected call of OAuthClient.

func (*MockAuthenticationServicesMockRecorder) TLSConfig

TLSConfig indicates an expected call of TLSConfig.

Directories

Path Synopsis
api
v1
Package v1 provides primitives to interact with the openapi HTTP API.
Package v1 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.
uzi

Jump to

Keyboard shortcuts

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