Package org.pac4j.saml.util
Class SAML2Utils
- java.lang.Object
-
- org.pac4j.saml.util.SAML2Utils
-
- All Implemented Interfaces:
HttpConstants
public final class SAML2Utils extends Object implements HttpConstants
SAML2 utilities.- Since:
- 1.8.0
- Author:
- jkacer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.pac4j.core.context.HttpConstants
HttpConstants.HTTP_METHOD
-
-
Field Summary
-
Fields inherited from interface org.pac4j.core.context.HttpConstants
ACCEPT_HEADER, ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER, ACCESS_CONTROL_ALLOW_HEADERS_HEADER, ACCESS_CONTROL_ALLOW_METHODS_HEADER, ACCESS_CONTROL_ALLOW_ORIGIN_HEADER, ACCESS_CONTROL_EXPOSE_HEADERS_HEADER, ACCESS_CONTROL_MAX_AGE_HEADER, AJAX_HEADER_NAME, AJAX_HEADER_VALUE, APPLICATION_FORM_ENCODED_HEADER_VALUE, APPLICATION_JSON, AUTHENTICATE_HEADER, AUTHORIZATION_HEADER, BAD_REQUEST, BASIC_HEADER_PREFIX, BEARER_HEADER_PREFIX, CONTENT_TYPE_HEADER, CREATED, DEFAULT_CONNECT_TIMEOUT, DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT, DEFAULT_READ_TIMEOUT, DIGEST_HEADER_PREFIX, FACES_PARTIAL_AJAX_PARAMETER, FORBIDDEN, FOUND, HTML_CONTENT_TYPE, LOCATION_HEADER, NO_CONTENT, OK, SCHEME_HTTP, SCHEME_HTTPS, SEE_OTHER, UNAUTHORIZED
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.opensaml.saml.metadata.resolver.ChainingMetadataResolver
buildChainingMetadataResolver(SAML2MetadataResolver idpMetadataProvider, SAML2MetadataResolver spMetadataProvider)
static String
generateID()
static boolean
urisEqualAfterPortNormalization(URI uri1, URI uri2)
Compares two URIs for equality, ignoring default port numbers for selected protocols.
-
-
-
Method Detail
-
generateID
public static String generateID()
-
urisEqualAfterPortNormalization
public static boolean urisEqualAfterPortNormalization(URI uri1, URI uri2)
Compares two URIs for equality, ignoring default port numbers for selected protocols. By default,URI.equals(Object)
doesn't take into account default port numbers, so http://server:80/resource is a different URI than http://server/resource. And URLs should not be used for comparison, as written here: http://stackoverflow.com/questions/3771081/proper-way-to-check-for-url-equality- Parameters:
uri1
- URI 1 to be compared.uri2
- URI 2 to be compared.- Returns:
- True if both URIs are equal.
-
buildChainingMetadataResolver
public static org.opensaml.saml.metadata.resolver.ChainingMetadataResolver buildChainingMetadataResolver(SAML2MetadataResolver idpMetadataProvider, SAML2MetadataResolver spMetadataProvider)
-
-