-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathDevLoginConfiguration.java
More file actions
27 lines (25 loc) · 1.14 KB
/
Copy pathDevLoginConfiguration.java
File metadata and controls
27 lines (25 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.digitalsanctuary.spring.user.dev;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
/**
* Configuration that registers {@link DevLoginConfigProperties}.
* <p>
* Activates only when the {@code local} profile is active and
* {@code user.dev.auto-login-enabled=true}. Individual dev-login components
* ({@link DevLoginController}, {@link DevLoginStartupWarning}) carry their own
* guards for defense-in-depth.
* </p>
* <p>
* Note: this class is registered via component scan (not Spring Boot SPI), so
* default property values are provided by {@code WebAuthnConfiguration}, which
* unconditionally loads {@code classpath:config/dsspringuserconfig.properties}.
* </p>
*/
@Configuration
@Profile("local")
@ConditionalOnProperty(name = "user.dev.auto-login-enabled", havingValue = "true", matchIfMissing = false)
@EnableConfigurationProperties(DevLoginConfigProperties.class)
public class DevLoginConfiguration {
}