mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
8aade7f40e
* added regulation validator * made regulations find_time and ban_time values duration notation strings * added DefaultRegulationConfiguration for the validator * made session expiration and inactivity values duration notation strings * TOTP period does not need to be converted because adjustment should be discouraged * moved TOTP defaults to DefaultTOTPConfiguration and removed the consts * arranged the root config validator in configuration file order * adjusted tests for the changes * moved duration notation docs to root of configuration * added references to duration notation where applicable * project wide gofmt and goimports: * run gofmt * run goimports -local github.com/authelia/authelia -w on all files * Make jwt_secret error uniform and add tests * now at 100% coverage for internal/configuration/validator/configuration.go
50 lines
1.4 KiB
Go
50 lines
1.4 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: internal/handlers/totp.go
|
|
|
|
// Package handlers is a generated GoMock package.
|
|
package handlers
|
|
|
|
import (
|
|
reflect "reflect"
|
|
|
|
gomock "github.com/golang/mock/gomock"
|
|
)
|
|
|
|
// MockTOTPVerifier is a mock of TOTPVerifier interface
|
|
type MockTOTPVerifier struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockTOTPVerifierMockRecorder
|
|
}
|
|
|
|
// MockTOTPVerifierMockRecorder is the mock recorder for MockTOTPVerifier
|
|
type MockTOTPVerifierMockRecorder struct {
|
|
mock *MockTOTPVerifier
|
|
}
|
|
|
|
// NewMockTOTPVerifier creates a new mock instance
|
|
func NewMockTOTPVerifier(ctrl *gomock.Controller) *MockTOTPVerifier {
|
|
mock := &MockTOTPVerifier{ctrl: ctrl}
|
|
mock.recorder = &MockTOTPVerifierMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
func (m *MockTOTPVerifier) EXPECT() *MockTOTPVerifierMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Verify mocks base method
|
|
func (m *MockTOTPVerifier) Verify(token, secret string) (bool, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Verify", token, secret)
|
|
ret0, _ := ret[0].(bool)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Verify indicates an expected call of Verify
|
|
func (mr *MockTOTPVerifierMockRecorder) Verify(token, secret interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockTOTPVerifier)(nil).Verify), token, secret)
|
|
}
|