Merge pull request #153 from clems4ever/opt-subdomain-methods

Make per_subdomain_methods optional in configuration file
pull/155/head
Clément Michaud 2017-10-15 21:39:24 +02:00 committed by GitHub
commit 8fa50482df
3 changed files with 19 additions and 2 deletions

View File

@ -55,8 +55,10 @@ ldap:
# #
# Note: by default a domain uses "two_factor" method. # Note: by default a domain uses "two_factor" method.
# #
# Note: 'overriden_methods' is a dictionary where keys must be subdomains and # Note: 'per_subdomain_methods' is a dictionary where keys must be subdomains and
# values must be one of the two possible methods. # values must be one of the two possible methods.
#
# Note: 'per_subdomain_methods' is optional.
authentication_methods: authentication_methods:
default_method: two_factor default_method: two_factor
per_subdomain_methods: per_subdomain_methods:

View File

@ -47,6 +47,21 @@ ldap:
user: cn=admin,dc=example,dc=com user: cn=admin,dc=example,dc=com
password: password password: password
# Authentication methods
#
# Authentication methods can be defined per subdomain.
# There are currently two available methods: "basic_auth" and "two_factor"
#
# Note: by default a domain uses "two_factor" method.
#
# Note: 'per_subdomain_methods' is a dictionary where keys must be subdomains and
# values must be one of the two possible methods.
#
# Note: 'per_subdomain_methods' is optional.
authentication_methods:
default_method: two_factor
per_subdomain_methods:
basicauth.test.local: basic_auth
# Access Control # Access Control
# #

View File

@ -116,7 +116,7 @@ declare type AuthenticationMethodPerSubdomain = { [subdomain: string]: Authentic
export interface AuthenticationMethodsConfiguration { export interface AuthenticationMethodsConfiguration {
default_method: AuthenticationMethod; default_method: AuthenticationMethod;
per_subdomain_methods: AuthenticationMethodPerSubdomain; per_subdomain_methods?: AuthenticationMethodPerSubdomain;
} }
export interface UserConfiguration { export interface UserConfiguration {