Class AuthProperties
- java.lang.Object
-
- org.bremersee.security.authentication.AuthProperties
-
@ConfigurationProperties(prefix="bremersee.auth") @Validated public class AuthProperties extends Object
Authentication and authorization properties.- Author:
- Christian Bremer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthProperties.ClientCredentialsFlowThe client credentials flow.static classAuthProperties.EurekaAccessPropertiesThe eureka access properties.static classAuthProperties.JwtCacheThe jwt cache properties.static classAuthProperties.PasswordFlowOAuth2 password flow configuration properties.static classAuthProperties.PathMatcherPropertiesThe path matcher properties.static classAuthProperties.SimpleUserA simple user.
-
Constructor Summary
Constructors Constructor Description AuthProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull org.springframework.security.core.userdetails.UserDetails[]buildBasicAuthUserDetails(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)Build user details from in memory users.@NotEmpty StringensureRolePrefix(@NotEmpty String role)Ensure role prefix.@NotEmpty List<AuthProperties.PathMatcherProperties>preparePathMatchers(@NotNull CorsProperties corsProperties)Prepare path matchers.
-
-
-
Method Detail
-
buildBasicAuthUserDetails
@NotNull public @NotNull org.springframework.security.core.userdetails.UserDetails[] buildBasicAuthUserDetails(@Nullable org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)Build user details from in memory users.- Parameters:
passwordEncoder- the password encoder- Returns:
- the user details
-
ensureRolePrefix
@NotEmpty public @NotEmpty String ensureRolePrefix(@NotEmpty @NotEmpty String role)
Ensure role prefix.- Parameters:
role- the role- Returns:
- the role with prefix
-
preparePathMatchers
@NotEmpty public @NotEmpty List<AuthProperties.PathMatcherProperties> preparePathMatchers(@NotNull @NotNull CorsProperties corsProperties)
Prepare path matchers.- Parameters:
corsProperties- the cors properties- Returns:
- the prepared path matchers
-
-