Documentation ¶
Overview ¶
Package auth is a generated GoMock package.
Index ¶
- Constants
- Variables
- type Auth
- func (auth *Auth) Config() interface{}
- func (auth *Auth) Configure(config core.ServerConfig) error
- func (auth *Auth) ContractNotary() services.ContractNotary
- func (auth *Auth) HTTPTimeout() time.Duration
- func (auth *Auth) Name() string
- func (auth *Auth) OAuthClient() services.OAuthClient
- func (auth *Auth) Shutdown() error
- func (auth *Auth) Start() error
- func (auth *Auth) TLSConfig() *tls.Config
- type AuthenticationServices
- type Config
- type MockAuthenticationServices
- func (m *MockAuthenticationServices) ContractNotary() services.ContractNotary
- func (m *MockAuthenticationServices) EXPECT() *MockAuthenticationServicesMockRecorder
- func (m *MockAuthenticationServices) HTTPTimeout() time.Duration
- func (m *MockAuthenticationServices) OAuthClient() services.OAuthClient
- func (m *MockAuthenticationServices) TLSConfig() *tls.Config
- type MockAuthenticationServicesMockRecorder
- func (mr *MockAuthenticationServicesMockRecorder) ContractNotary() *gomock.Call
- func (mr *MockAuthenticationServicesMockRecorder) HTTPTimeout() *gomock.Call
- func (mr *MockAuthenticationServicesMockRecorder) OAuthClient() *gomock.Call
- func (mr *MockAuthenticationServicesMockRecorder) TLSConfig() *gomock.Call
Constants ¶
const JwtBearerGrantType = "urn:ietf:params:oauth:grant-type:jwt-bearer"
JwtBearerGrantType defines the grant-type to use in the access token request
const ModuleName = "Auth"
ModuleName contains the name of this module
Variables ¶
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 (*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 ¶
HTTPTimeout returns the HTTP timeout to use for the Auth API HTTP client
func (*Auth) OAuthClient ¶
func (auth *Auth) OAuthClient() services.OAuthClient
OAuthClient returns an instance of OAuthClient
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 ¶
func (m *MockAuthenticationServices) ContractNotary() services.ContractNotary
ContractNotary mocks base method.
func (*MockAuthenticationServices) EXPECT ¶
func (m *MockAuthenticationServices) EXPECT() *MockAuthenticationServicesMockRecorder
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 ¶
func (m *MockAuthenticationServices) OAuthClient() services.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 ¶
func (mr *MockAuthenticationServicesMockRecorder) HTTPTimeout() *gomock.Call
HTTPTimeout indicates an expected call of HTTPTimeout.
func (*MockAuthenticationServicesMockRecorder) OAuthClient ¶
func (mr *MockAuthenticationServicesMockRecorder) OAuthClient() *gomock.Call
OAuthClient indicates an expected call of OAuthClient.
func (*MockAuthenticationServicesMockRecorder) TLSConfig ¶
func (mr *MockAuthenticationServicesMockRecorder) TLSConfig() *gomock.Call
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. |