fix: include major in go.mod module directive (#2278)

* build: include major in go.mod module directive

* fix: xflags

* revert: cobra changes

* fix: mock doc
This commit is contained in:
James Elliott 2021-08-11 11:04:35 +10:00 committed by Amir Zarrinkafsh
parent 9c024cfa20
commit b4e570358e
No known key found for this signature in database
GPG Key ID: ECDB8EF9E77E4EBF
165 changed files with 327 additions and 327 deletions

View File

@ -10,7 +10,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
// HostEntry represents an entry in /etc/hosts.

View File

@ -7,7 +7,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
func buildAutheliaBinary(xflags []string) {

View File

@ -4,7 +4,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
// RunCI run the CI scripts.

View File

@ -11,7 +11,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
var arch string

View File

@ -4,12 +4,12 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
// ServeCmd serve Authelia with the provided configuration.
func ServeCmd(cobraCmd *cobra.Command, args []string) {
func ServeCmd(cmd *cobra.Command, args []string) {
log.Infof("Running Authelia with config %s...", args[0])
cmd := utils.CommandWithStdout(OutputDir+"/authelia", "--config", args[0])
utils.RunCommandUntilCtrlC(cmd)
execCmd := utils.CommandWithStdout(OutputDir+"/authelia", "--config", args[0])
utils.RunCommandUntilCtrlC(execCmd)
}

View File

@ -14,8 +14,8 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/suites"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/suites"
"github.com/authelia/authelia/v4/internal/utils"
)
// ErrNotAvailableSuite error raised when suite is not available.

View File

@ -6,7 +6,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
// RunUnitTest run the unit tests.

View File

@ -19,4 +19,4 @@ const stringFalse = "false"
const stringTrue = "true"
const webDirectory = "web"
const fmtLDFLAGSX = "-X 'github.com/authelia/authelia/internal/utils.%s=%s'"
const fmtLDFLAGSX = "-X 'github.com/authelia/authelia/v4/internal/utils.%s=%s'"

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
// Docker a docker object.

View File

@ -5,7 +5,7 @@ import (
"strings"
"time"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
func getXFlags(branch, build, extra string) (flags []string, err error) {

View File

@ -7,8 +7,8 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/commands"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/commands"
"github.com/authelia/authelia/v4/internal/utils"
)
var buildkite bool

View File

@ -11,8 +11,8 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/suites"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/suites"
"github.com/authelia/authelia/v4/internal/utils"
)
var tmpDirectory = "/tmp/authelia/suites/"

View File

@ -1,8 +1,8 @@
package main
import (
"github.com/authelia/authelia/internal/commands"
"github.com/authelia/authelia/internal/logging"
"github.com/authelia/authelia/v4/internal/commands"
"github.com/authelia/authelia/v4/internal/logging"
)
func main() {

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/authelia/authelia
module github.com/authelia/authelia/v4
go 1.16

View File

@ -11,8 +11,8 @@ import (
"github.com/asaskevich/govalidator"
"gopkg.in/yaml.v2"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/logging"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/logging"
)
// FileUserProvider is a provider reading details from a file.

View File

@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func WithDatabase(content []byte, f func(path string)) {

View File

@ -11,9 +11,9 @@ import (
"github.com/sirupsen/logrus"
"golang.org/x/text/encoding/unicode"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/logging"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/logging"
"github.com/authelia/authelia/v4/internal/utils"
)
// LDAPUserProvider is a UserProvider that connects to LDAP servers like ActiveDirectory, OpenLDAP, OpenDJ, FreeIPA, etc.

View File

@ -11,8 +11,8 @@ import (
"github.com/stretchr/testify/require"
"golang.org/x/text/encoding/unicode"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
func TestShouldCreateRawConnectionWhenSchemeIsLDAP(t *testing.T) {

View File

@ -9,7 +9,7 @@ import (
"github.com/simia-tech/crypt"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
// PasswordHash represents all characteristics of a password hash.

View File

@ -8,8 +8,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
func TestShouldHashSHA512Password(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
// AccessControlDomain represents an ACL domain.

View File

@ -3,8 +3,8 @@ package authorization
import (
"net"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// NewAccessControlRules converts a schema.AccessControlConfiguration into an AccessControlRule slice.

View File

@ -1,7 +1,7 @@
package authorization
import (
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
// AccessControlSubject abstracts an ACL subject of type `group:` or `user:`.

View File

@ -1,8 +1,8 @@
package authorization
import (
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/logging"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/logging"
)
// Authorizer the component in charge of checking whether a user can access a given resource.

View File

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
type AuthorizerSuite struct {

View File

@ -5,8 +5,8 @@ import (
"regexp"
"strings"
"github.com/authelia/authelia/internal/authentication"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/authentication"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
// PolicyToLevel converts a string policy to int authorization level.

View File

@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/authentication"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/authentication"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func TestShouldNotParseInvalidSubjects(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
func newBuildInfoCmd() (cmd *cobra.Command) {

View File

@ -5,10 +5,10 @@ import (
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/configuration"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/configuration/validator"
"github.com/authelia/authelia/internal/logging"
"github.com/authelia/authelia/v4/internal/configuration"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/validator"
"github.com/authelia/authelia/v4/internal/logging"
)
// cmdWithConfigFlags is used for commands which require access to the configuration to add the flag to the command.

View File

@ -6,9 +6,9 @@ import (
"github.com/simia-tech/crypt"
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/authentication"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/logging"
"github.com/authelia/authelia/v4/internal/authentication"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/logging"
)
// NewHashPasswordCmd returns a new Hash Password Cmd.

View File

@ -6,18 +6,18 @@ import (
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/authentication"
"github.com/authelia/authelia/internal/authorization"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/logging"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/notification"
"github.com/authelia/authelia/internal/oidc"
"github.com/authelia/authelia/internal/regulation"
"github.com/authelia/authelia/internal/server"
"github.com/authelia/authelia/internal/session"
"github.com/authelia/authelia/internal/storage"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/authentication"
"github.com/authelia/authelia/v4/internal/authorization"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/logging"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/notification"
"github.com/authelia/authelia/v4/internal/oidc"
"github.com/authelia/authelia/v4/internal/regulation"
"github.com/authelia/authelia/v4/internal/server"
"github.com/authelia/authelia/v4/internal/session"
"github.com/authelia/authelia/v4/internal/storage"
"github.com/authelia/authelia/v4/internal/utils"
)
// NewRootCmd returns a new Root Cmd.

View File

@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
// NewRSACmd returns a new RSA Cmd.

View File

@ -6,10 +6,10 @@ import (
"github.com/spf13/cobra"
"github.com/authelia/authelia/internal/configuration"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/configuration/validator"
"github.com/authelia/authelia/internal/logging"
"github.com/authelia/authelia/v4/internal/configuration"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/validator"
"github.com/authelia/authelia/v4/internal/logging"
)
func newValidateConfigCmd() (cmd *cobra.Command) {

View File

@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
func TestShouldHaveSameChecksumForBothTemplates(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"io/ioutil"
"strings"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
func getEnvConfigMap(keys []string, prefix, delimiter string) (keyMap map[string]string, ignoredKeys []string) {

View File

@ -4,9 +4,9 @@ import (
"fmt"
"strings"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/configuration/validator"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/validator"
"github.com/authelia/authelia/v4/internal/utils"
)
// koanfEnvironmentCallback returns a koanf callback to map the environment vars to Configuration keys.

View File

@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func TestKoanfEnvironmentCallback(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"github.com/knadh/koanf"
"github.com/mitchellh/mapstructure"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
// Load the configuration given the provided options and sources.

View File

@ -12,9 +12,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/configuration/validator"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/validator"
"github.com/authelia/authelia/v4/internal/utils"
)
func TestShouldErrorSecretNotExist(t *testing.T) {

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
type TestNestedStruct struct {

View File

@ -9,8 +9,8 @@ import (
"github.com/knadh/koanf/providers/env"
"github.com/knadh/koanf/providers/file"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/configuration/validator"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/validator"
)
// NewYAMLFileSource returns a Source configured to load from a specified YAML path. If there is an issue accessing this

View File

@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/utils"
)
func TestShouldGenerateConfiguration(t *testing.T) {

View File

@ -3,7 +3,7 @@ package configuration
import (
"github.com/knadh/koanf"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
// Source is an abstract representation of a configuration Source implementation.

View File

@ -6,8 +6,8 @@ import (
"regexp"
"strings"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// IsPolicyValid check if policy is valid.

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
type AccessControl struct {

View File

@ -6,8 +6,8 @@ import (
"net/url"
"strings"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// ValidateAuthenticationBackend validates and updates the authentication backend configuration.

View File

@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func TestShouldRaiseErrorWhenBothBackendsProvided(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"fmt"
"os"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// ValidateConfiguration and adapt the configuration read from file.

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func newDefaultConfig() schema.Configuration {

View File

@ -6,8 +6,8 @@ import (
"strings"
"time"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// ValidateIdentityProviders validates and update IdentityProviders configuration.

View File

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func TestShouldRaiseErrorWhenInvalidOIDCServerConfiguration(t *testing.T) {

View File

@ -5,8 +5,8 @@ import (
"fmt"
"strings"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// ValidateKeys determines if all provided keys are valid.

View File

@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
func TestShouldValidateGoodKeys(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// ValidateLogging validates the logging configuration.

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func TestShouldSetDefaultLoggingValues(t *testing.T) {

View File

@ -3,7 +3,7 @@ package validator
import (
"fmt"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
// ValidateNotifier validates and update notifier configuration.

View File

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
type NotifierSuite struct {

View File

@ -3,8 +3,8 @@ package validator
import (
"fmt"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// ValidateRegulation validates and update regulator configuration.

View File

@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func newDefaultRegulationConfig() schema.RegulationConfiguration {

View File

@ -5,8 +5,8 @@ import (
"path"
"strings"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// ValidateServer checks a server configuration is correct.

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func TestShouldSetDefaultServerValues(t *testing.T) {

View File

@ -5,8 +5,8 @@ import (
"fmt"
"strings"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/utils"
)
// ValidateSession validates and update session configuration.

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func newDefaultSessionConfig() schema.SessionConfiguration {

View File

@ -3,7 +3,7 @@ package validator
import (
"errors"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
// ValidateStorage validates storage configuration.

View File

@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
type StorageSuite struct {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"regexp"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
// ValidateTheme validates and update Theme configuration.

View File

@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
type Theme struct {

View File

@ -3,7 +3,7 @@ package validator
import (
"fmt"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
// ValidateTOTP validates and update TOTP configuration.

View File

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/configuration/schema"
)
func TestShouldSetDefaultTOTPValues(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
duoapi "github.com/duosecurity/duo_api_golang"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
// NewDuoAPI create duo API instance.

View File

@ -5,7 +5,7 @@ import (
duoapi "github.com/duosecurity/duo_api_golang"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
// API interface wrapping duo api library for testing purpose.

View File

@ -3,9 +3,9 @@ package handlers
import (
"fmt"
"github.com/authelia/authelia/internal/authentication"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/authentication"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/utils"
)
// CheckSafeRedirection handler checking whether the redirection to a given URL provided in body is safe.

View File

@ -5,9 +5,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/authelia/authelia/internal/authentication"
"github.com/authelia/authelia/internal/mocks"
"github.com/authelia/authelia/internal/session"
"github.com/authelia/authelia/v4/internal/authentication"
"github.com/authelia/authelia/v4/internal/mocks"
"github.com/authelia/authelia/v4/internal/session"
)
var exampleDotComDomain = "example.com"

View File

@ -1,8 +1,8 @@
package handlers
import (
"github.com/authelia/authelia/internal/authentication"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/authentication"
"github.com/authelia/authelia/v4/internal/middlewares"
)
// ConfigurationBody the content returned by the configuration endpoint.

View File

@ -5,9 +5,9 @@ import (
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/authorization"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/mocks"
"github.com/authelia/authelia/v4/internal/authorization"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/mocks"
)
type SecondFactorAvailableMethodsFixture struct {

View File

@ -7,9 +7,9 @@ import (
"sync"
"time"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/regulation"
"github.com/authelia/authelia/internal/session"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/regulation"
"github.com/authelia/authelia/v4/internal/session"
)
func movingAverageIteration(value time.Duration, successful bool, movingAverageCursor *int, execDurationMovingAverage *[]time.Duration, mutex sync.Locker) float64 {

View File

@ -10,11 +10,11 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/authentication"
"github.com/authelia/authelia/internal/authorization"
"github.com/authelia/authelia/internal/configuration/schema"
"github.com/authelia/authelia/internal/mocks"
"github.com/authelia/authelia/internal/models"
"github.com/authelia/authelia/v4/internal/authentication"
"github.com/authelia/authelia/v4/internal/authorization"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/mocks"
"github.com/authelia/authelia/v4/internal/models"
)
type FirstFactorSuite struct {

View File

@ -1,7 +1,7 @@
package handlers
import (
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
// HealthGet can be used by health checks.

View File

@ -4,8 +4,8 @@ import (
"fmt"
"net/url"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/utils"
)
type logoutBody struct {

View File

@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/mocks"
"github.com/authelia/authelia/v4/internal/mocks"
)
type LogoutSuite struct {

View File

@ -10,11 +10,11 @@ import (
"github.com/ory/fosite/handler/openid"
"github.com/ory/fosite/token/jwt"
"github.com/authelia/authelia/internal/logging"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/oidc"
"github.com/authelia/authelia/internal/session"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/logging"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/oidc"
"github.com/authelia/authelia/v4/internal/session"
"github.com/authelia/authelia/v4/internal/utils"
)
func oidcAuthorization(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter, r *http.Request) {

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
func oidcConsent(ctx *middlewares.AutheliaCtx) {

View File

@ -3,7 +3,7 @@ package handlers
import (
"net/http"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
func oidcIntrospection(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter, req *http.Request) {

View File

@ -3,7 +3,7 @@ package handlers
import (
"encoding/json"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
func oidcJWKs(ctx *middlewares.AutheliaCtx) {

View File

@ -3,7 +3,7 @@ package handlers
import (
"net/http"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
func oidcRevocation(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter, req *http.Request) {

View File

@ -5,7 +5,7 @@ import (
"github.com/ory/fosite"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
func oidcToken(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter, req *http.Request) {

View File

@ -10,8 +10,8 @@ import (
"github.com/ory/fosite/token/jwt"
"github.com/pkg/errors"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/oidc"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/oidc"
)
func oidcUserinfo(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter, req *http.Request) {

View File

@ -6,8 +6,8 @@ import (
"github.com/valyala/fasthttp"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/oidc"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/oidc"
)
func oidcWellKnown(ctx *middlewares.AutheliaCtx) {

View File

@ -5,8 +5,8 @@ import (
"github.com/pquerna/otp/totp"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/session"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/session"
)
// identityRetrieverFromSession retriever computing the identity from the cookie session.

View File

@ -5,7 +5,7 @@ import (
"github.com/tstranex/u2f"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
var u2fConfig = &u2f.Config{

View File

@ -11,8 +11,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/mocks"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/mocks"
)
type HandlerRegisterU2FStep1Suite struct {

View File

@ -6,7 +6,7 @@ import (
"github.com/tstranex/u2f"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
// SecondFactorU2FRegister handler validating the client has successfully validated the challenge

View File

@ -4,8 +4,8 @@ import (
"encoding/json"
"fmt"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/session"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/session"
)
func identityRetrieverFromStorage(ctx *middlewares.AutheliaCtx) (*session.Identity, error) {

View File

@ -3,8 +3,8 @@ package handlers
import (
"fmt"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/utils"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/utils"
)
// ResetPasswordPost handler for resetting passwords.

View File

@ -4,8 +4,8 @@ import (
"fmt"
"net/url"
"github.com/authelia/authelia/internal/duo"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/duo"
"github.com/authelia/authelia/v4/internal/middlewares"
)
// SecondFactorDuoPost handler for sending a push notification via duo api.

View File

@ -12,8 +12,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/duo"
"github.com/authelia/authelia/internal/mocks"
"github.com/authelia/authelia/v4/internal/duo"
"github.com/authelia/authelia/v4/internal/mocks"
)
type SecondFactorDuoPostSuite struct {

View File

@ -3,7 +3,7 @@ package handlers
import (
"fmt"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/v4/internal/middlewares"
)
// SecondFactorTOTPPost validate the TOTP passcode provided by the user.

View File

@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/suite"
"github.com/tstranex/u2f"
"github.com/authelia/authelia/internal/mocks"
"github.com/authelia/authelia/internal/session"
"github.com/authelia/authelia/v4/internal/mocks"
"github.com/authelia/authelia/v4/internal/session"
)
type HandlerSignTOTPSuite struct {

View File

@ -6,9 +6,9 @@ import (
"github.com/tstranex/u2f"
"github.com/authelia/authelia/internal/middlewares"
"github.com/authelia/authelia/internal/session"
"github.com/authelia/authelia/internal/storage"
"github.com/authelia/authelia/v4/internal/middlewares"
"github.com/authelia/authelia/v4/internal/session"
"github.com/authelia/authelia/v4/internal/storage"
)
// SecondFactorU2FSignGet handler for initiating a signing request.

View File

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/authelia/authelia/internal/mocks"
"github.com/authelia/authelia/v4/internal/mocks"
)
type HandlerSignU2FStep1Suite struct {

Some files were not shown because too many files have changed in this diff Show More