public final class RestSecurity extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AUTH_HEADER |
static String |
BASIC_HEADER_PREFIX |
static boolean |
GZIP_COMPATIBLE |
static String |
SAML_HEADER_PREFIX |
Modifier and Type | Method and Description |
---|---|
static byte[] |
base64Decode(String base64EncodedValue)
Decodes Base64 encoded values
|
static String |
deflateAndBase64Encode(String value)
Deflates a value and Base64 encodes the result.
|
static String |
inflateBase64(String base64EncodedValue) |
static void |
setSubjectOnClient(Subject subject,
org.apache.cxf.jaxrs.client.Client client)
Parses the incoming subject for a saml assertion and sets that as a header on the client.
|
static void |
setUserOnClient(String username,
String password,
org.apache.cxf.jaxrs.client.Client client) |
public static final String SAML_HEADER_PREFIX
public static final String BASIC_HEADER_PREFIX
public static final String AUTH_HEADER
public static final boolean GZIP_COMPATIBLE
public static void setSubjectOnClient(Subject subject, org.apache.cxf.jaxrs.client.Client client)
subject
- Subject containing a SAML-based security token.client
- Non-null client to set the cookie on.NullPointerException
- if client is nullpublic static void setUserOnClient(String username, String password, org.apache.cxf.jaxrs.client.Client client) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String deflateAndBase64Encode(String value) throws IOException
value
- value to deflate and Base64 encodeIOException
- if the value cannot be convertedpublic static String inflateBase64(String base64EncodedValue) throws IOException
IOException
public static byte[] base64Decode(String base64EncodedValue)
base64EncodedValue
- value to decodeThis work is licensed under a Creative Commons Attribution 4.0 International License.