Class RedirectBindingUtil
java.lang.Object
org.keycloak.saml.processing.web.util.RedirectBindingUtil
Utility class for SAML HTTP/Redirect binding
- Since:
- Jan 14, 2009
- Author:
- Anil.Saldhana@redhat.com
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A Destination holder that holds the destination host url and the destination query string -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStream
base64DeflateDecode
(String encodedString) Base64 decode followed by Deflate decodingstatic String
base64Encode
(byte[] stringToEncode) On the byte array, apply base64 encodingstatic String
base64URLEncode
(byte[] stringToEncode) On the byte array, apply base64 encoding following by URL encodingstatic String
deflateBase64Encode
(byte[] stringToEncode) Apply deflate compression followed by base64 encodingstatic String
deflateBase64URLEncode
(byte[] stringToEncode) Apply deflate compression followed by base64 encoding and URL encodingstatic String
deflateBase64URLEncode
(String stringToEncode) Apply deflate compression followed by base64 encoding and URL encodingstatic String
getDestinationQueryString
(String urlEncodedRequest, String urlEncodedRelayState, boolean sendRequest) Get the Query String for the destination urlstatic String
Get the destination urlstatic byte[]
urlBase64Decode
(String encodedString) On the byte array, apply URL decoding followed by base64 decodingstatic InputStream
urlBase64DeflateDecode
(String encodedString) Apply URL decoding, followed by base64 decoding followed by deflate decompressionstatic String
URL decode the stringstatic String
URL encode the string
-
Constructor Details
-
RedirectBindingUtil
public RedirectBindingUtil()
-
-
Method Details
-
urlEncode
URL encode the string- Parameters:
str
-- Returns:
- Throws:
IOException
-
urlDecode
URL decode the string- Parameters:
str
-- Returns:
- Throws:
IOException
-
base64Encode
On the byte array, apply base64 encoding- Parameters:
stringToEncode
-- Returns:
- Throws:
IOException
-
base64URLEncode
On the byte array, apply base64 encoding following by URL encoding- Parameters:
stringToEncode
-- Returns:
- Throws:
IOException
-
urlBase64Decode
On the byte array, apply URL decoding followed by base64 decoding- Parameters:
encodedString
-- Returns:
- Throws:
IOException
-
deflateBase64URLEncode
Apply deflate compression followed by base64 encoding and URL encoding- Parameters:
stringToEncode
-- Returns:
- Throws:
IOException
-
deflateBase64URLEncode
Apply deflate compression followed by base64 encoding and URL encoding- Parameters:
stringToEncode
-- Returns:
- Throws:
IOException
-
deflateBase64Encode
Apply deflate compression followed by base64 encoding- Parameters:
stringToEncode
-- Returns:
- Throws:
IOException
-
urlBase64DeflateDecode
Apply URL decoding, followed by base64 decoding followed by deflate decompression- Parameters:
encodedString
-- Returns:
- Throws:
IOException
-
base64DeflateDecode
Base64 decode followed by Deflate decoding- Parameters:
encodedString
-- Returns:
- Throws:
IOException
-
getDestinationQueryString
public static String getDestinationQueryString(String urlEncodedRequest, String urlEncodedRelayState, boolean sendRequest) Get the Query String for the destination url- Parameters:
urlEncodedRequest
-urlEncodedRelayState
-sendRequest
- either going to be saml request or response- Returns:
-
getDestinationURL
public static String getDestinationURL(RedirectBindingUtil.RedirectBindingUtilDestHolder holder) throws IOException Get the destination url- Parameters:
holder
-- Returns:
- Throws:
IOException
-