Files
akvorado/console/authentication/config.go
Vincent Bernat 8be1bca4fd license: AGPL-3.0-only
```
git ls-files \*.js \*.go \
  | xargs sed -i '1i // SPDX-FileCopyrightText: 2022 Free Mobile\n// SPDX-License-Identifier: AGPL-3.0-only\n'
git ls-files \*.vue \
  | xargs sed -i '1i <!-- SPDX-FileCopyrightText: 2022 Free Mobile -->\n<!-- SPDX-License-Identifier: AGPL-3.0-only -->\n'
```
2022-06-29 11:42:28 +02:00

39 lines
1.0 KiB
Go

// SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only
package authentication
// Configuration describes the configuration for the authentication component.
type Configuration struct {
// Headers define authentication headers
Headers ConfigurationHeaders
// DefaultUser define the default user when no authentication
// headers are present. Leave `User' empty to not allow access
// without authentication.
DefaultUser UserInformation
}
// ConfigurationHeaders define headers used for authentication
type ConfigurationHeaders struct {
Login string
Name string
Email string
LogoutURL string
}
// DefaultConfiguration represents the default configuration for the console component.
func DefaultConfiguration() Configuration {
return Configuration{
Headers: ConfigurationHeaders{
Login: "Remote-User",
Name: "Remote-Name",
Email: "Remote-Email",
LogoutURL: "X-Logout-URL",
},
DefaultUser: UserInformation{
Login: "__default",
Name: "Default User",
},
}
}