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 class
AuthProperties.ClientCredentialsFlow
The client credentials flow.static class
AuthProperties.EurekaAccessProperties
The eureka access properties.static class
AuthProperties.JwtCache
The jwt cache properties.static class
AuthProperties.PasswordFlow
OAuth2 password flow configuration properties.static class
AuthProperties.PathMatcherProperties
The path matcher properties.static class
AuthProperties.SimpleUser
A 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 String
ensureRolePrefix(@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
-
-