Class SecureContextResolver

java.lang.Object
org.keycloak.utils.SecureContextResolver

public class SecureContextResolver extends Object
  • Constructor Details

    • SecureContextResolver

      public SecureContextResolver()
  • Method Details

    • isSecureContext

      public static boolean isSecureContext(KeycloakSession session)
      Determines if a session is within a 'secure context', meaning its origin is considered potentially trustworthy by user-agents.
      Parameters:
      session - The session to check for trustworthiness.
      Returns:
      Whether the session can be considered potentially trustworthy by user-agents.
      See Also:
    • isLocalAddress

      public static boolean isLocalAddress(String address)
      Test whether the given address is the localhost
      Parameters:
      address -
      Returns:
      false if the address is not localhost or not an address value