Class AuthProperties


  • @ConfigurationProperties(prefix="bremersee.auth")
    @Validated
    public class AuthProperties
    extends Object
    Authentication and authorization properties.
    Author:
    Christian Bremer
    • Constructor Detail

      • AuthProperties

        public AuthProperties()
    • 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