auth

package
v6.2.13 Latest Latest
Warning

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

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

Documentation

Overview

Package auth is a generated GoMock package.

Index

Constants

View Source
const ModuleName = "Auth"

ModuleName contains the name of this module

Variables

This section is empty.

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, vdrInstance vdr.VDR, subjectManager didsubject.Manager, 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) AuthorizationEndpointEnabled

func (auth *Auth) AuthorizationEndpointEnabled() bool

AuthorizationEndpointEnabled returns whether the v2 API's OAuth2 Authorization Endpoint is enabled.

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

func (auth *Auth) IAMClient() iam.Client

func (*Auth) Name

func (auth *Auth) Name() string

Name returns the name of the module.

func (*Auth) PublicURL

func (auth *Auth) PublicURL() *url.URL

PublicURL returns the public URL of the node.

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)

func (*Auth) SupportedDIDMethods

func (auth *Auth) SupportedDIDMethods() []string

type AuthenticationServices

type AuthenticationServices interface {
	// AuthzServer returns the oauth.AuthorizationServer
	AuthzServer() oauth.AuthorizationServer
	// IAMClient returns the IAM Client API
	IAMClient() iam.Client
	// RelyingParty returns the oauth.RelyingParty
	RelyingParty() oauth.RelyingParty
	// ContractNotary returns an instance of ContractNotary
	ContractNotary() services.ContractNotary
	// PublicURL returns the public URL of the node.
	PublicURL() *url.URL
	// AuthorizationEndpointEnabled returns whether the v2 API's OAuth2 Authorization Endpoint is enabled.
	AuthorizationEndpointEnabled() bool
	// SupportedDIDMethods lists the DID methods the Nuts node can resolve.
	SupportedDIDMethods() []string
}

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

type AuthorizationEndpointConfig

type AuthorizationEndpointConfig struct {
	// Enabled is a flag to enable or disable the v2 API's Authorization Endpoint (/authorize), used for:
	// - As OpenID4VP verifier: to authenticate clients (that initiate the Authorized Code flow) using OpenID4VP
	// - As OpenID4VP wallet: to authenticate verifiers using OpenID4VP
	// - As OpenID4VCI wallet: to support dynamic credential requests (currently not supported)
	// Disabling the authorization endpoint will also disable to callback endpoint and removes the endpoint from the metadata.
	Enabled bool `koanf:"enabled"`
}

type CORSConfig

type CORSConfig struct {
	// Origin specifies the AllowOrigin option. If no origins are given CORS is considered to be disabled.
	Origin []string `koanf:"origin"`
}

CORSConfig contains configuration for Cross Origin Resource Sharing.

type Config

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

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"`
	CORS              CORSConfig `koanf:"cors"`
}

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

func (m *MockAuthenticationServices) AuthorizationEndpointEnabled() bool

AuthorizationEndpointEnabled mocks base method.

func (*MockAuthenticationServices) AuthzServer

AuthzServer mocks base method.

func (*MockAuthenticationServices) ContractNotary

ContractNotary mocks base method.

func (*MockAuthenticationServices) EXPECT

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

func (*MockAuthenticationServices) IAMClient

func (m *MockAuthenticationServices) IAMClient() iam.Client

IAMClient mocks base method.

func (*MockAuthenticationServices) PublicURL

func (m *MockAuthenticationServices) PublicURL() *url.URL

PublicURL mocks base method.

func (*MockAuthenticationServices) RelyingParty

func (m *MockAuthenticationServices) RelyingParty() oauth.RelyingParty

RelyingParty mocks base method.

func (*MockAuthenticationServices) SupportedDIDMethods

func (m *MockAuthenticationServices) SupportedDIDMethods() []string

SupportedDIDMethods mocks base method.

type MockAuthenticationServicesMockRecorder

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

MockAuthenticationServicesMockRecorder is the mock recorder for MockAuthenticationServices.

func (*MockAuthenticationServicesMockRecorder) AuthorizationEndpointEnabled

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

AuthorizationEndpointEnabled indicates an expected call of AuthorizationEndpointEnabled.

func (*MockAuthenticationServicesMockRecorder) AuthzServer

AuthzServer indicates an expected call of AuthzServer.

func (*MockAuthenticationServicesMockRecorder) ContractNotary

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

ContractNotary indicates an expected call of ContractNotary.

func (*MockAuthenticationServicesMockRecorder) IAMClient

IAMClient indicates an expected call of IAMClient.

func (*MockAuthenticationServicesMockRecorder) PublicURL

PublicURL indicates an expected call of PublicURL.

func (*MockAuthenticationServicesMockRecorder) RelyingParty

RelyingParty indicates an expected call of RelyingParty.

func (*MockAuthenticationServicesMockRecorder) SupportedDIDMethods

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

SupportedDIDMethods indicates an expected call of SupportedDIDMethods.

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.
iam
Package iam provides primitives to interact with the openapi HTTP API.
Package iam provides primitives to interact with the openapi HTTP API.
client
iam
Package iam is a generated GoMock package.
Package iam is a generated GoMock package.
Package contract is a generated GoMock package.
Package contract is a generated GoMock package.
Package oauth contains generic OAuth related functionality, variables and constants
Package oauth contains generic OAuth related functionality, variables and constants
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.

Jump to

Keyboard shortcuts

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