Record Class SecurityConfig

java.lang.Object
java.lang.Record
io.john.amiscaray.quak.security.config.SecurityConfig
Record Components:
authenticationStrategy - The authentication strategy to use for secured endpoints.
securedEndpointRoles - A map representing the roles to use to secure a given endpoint.
pathCorsConfigMap - A map of paths and their CORS config.
jwtSecretKey - The JWT secret key to use if using the JWT authentication strategy.
jwtSecretExpiryTime - The JWT expiry time to use if using the JWT authentication strategy.

public record SecurityConfig(AuthenticationStrategy authenticationStrategy, Map<EndpointMapping,List<Role>> securedEndpointRoles, Map<String,CORSConfig> pathCorsConfigMap, String jwtSecretKey, Long jwtSecretExpiryTime) extends Record
The Application's security config.
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • authenticationStrategy

      public AuthenticationStrategy authenticationStrategy()
      Returns the value of the authenticationStrategy record component.
      Returns:
      the value of the authenticationStrategy record component
    • securedEndpointRoles

      public Map<EndpointMapping,List<Role>> securedEndpointRoles()
      Returns the value of the securedEndpointRoles record component.
      Returns:
      the value of the securedEndpointRoles record component
    • pathCorsConfigMap

      public Map<String,CORSConfig> pathCorsConfigMap()
      Returns the value of the pathCorsConfigMap record component.
      Returns:
      the value of the pathCorsConfigMap record component
    • jwtSecretKey

      public String jwtSecretKey()
      Returns the value of the jwtSecretKey record component.
      Returns:
      the value of the jwtSecretKey record component
    • jwtSecretExpiryTime

      public Long jwtSecretExpiryTime()
      Returns the value of the jwtSecretExpiryTime record component.
      Returns:
      the value of the jwtSecretExpiryTime record component