Modifier and Type | Field and Description |
---|---|
static ResourceBundle |
bundle
SAML resource bundle object.
|
static Debug |
debug
SAML debug object.
|
static SecureRandom |
random
SecureRandom instance. |
static String |
SAMLID_PREFIX
Prefix for ids used in SAML service.
|
static SAMLConstants |
sc
A handle for
SAMLConstants . |
Constructor and Description |
---|
SAMLUtilsCommon() |
Modifier and Type | Method and Description |
---|---|
static String |
byteArrayToHexString(byte[] byteArray)
Converts a byte array to a hex string.
|
static String |
byteArrayToString(byte[] bytes)
Converts byte array to string.
|
static boolean |
checkStatement(Element element,
String statementname)
Verifies if an element is a type of a specific statement.
|
static String |
decodePassword(String password)
Decodes a password.
|
static String |
generateAssertionID()
Generates an ID String with length of SAMLConstants.ID_LENGTH.
|
static String |
generateID()
Generates an ID String with length of SAMLConstants.ID_LENGTH.
|
static String |
getDecodedSourceIDString(String encodedID)
Decodes the Base64 encoded
sourceid and returns
a String of the raw-byte source id. |
static String |
makeEndElementTagXML(String elementName,
boolean includeNS)
Generates end element tag.
|
static String |
makeStartElementTagXML(String elementName,
boolean includeNS,
boolean declareNS)
Generates xml element start tag.
|
static String |
removeNewLineChars(String s)
Removes new line charactors.
|
static void |
setDebugInstance(Debug dbg)
Sets the
Debug of the service. |
static void |
setResourceBundle(ResourceBundle resBundle)
Sets the
ResourceBundle of the service. |
public static SecureRandom random
SecureRandom
instance.public static final String SAMLID_PREFIX
public static SAMLConstants sc
SAMLConstants
.public static ResourceBundle bundle
public static Debug debug
public static void setResourceBundle(ResourceBundle resBundle)
ResourceBundle
of the service.resBundle
- ResourceBundle
instance to be set.public static void setDebugInstance(Debug dbg)
Debug
of the service.dbg
- Debug
instance to be set.public static String generateAssertionID()
public static String generateID()
public static String byteArrayToHexString(byte[] byteArray)
public static String makeEndElementTagXML(String elementName, boolean includeNS)
elementName
- name of an elementincludeNS
- true to include namespace prefix; false otherwise.public static String makeStartElementTagXML(String elementName, boolean includeNS, boolean declareNS)
AssertionBase
class if declareNS and includeNS are true.elementName
- name of the element.includeNS
- true to include namespace prefix; false otherwise.declareNS
- true to include namespace declaration; false otherwise.public static boolean checkStatement(Element element, String statementname)
element
- a DOM Element which needs to be verified.statementname
- A specific name of a statement, for example,
AuthenticationStatement, AuthorizationDecisionStatement or
AttributeStatementpublic static String decodePassword(String password)
password
- original password.public static String removeNewLineChars(String s)
s
- A String to be checked.public static String getDecodedSourceIDString(String encodedID)
sourceid
and returns
a String of the raw-byte source id.encodedID
- A String representing the Base64 encoded source id.public static String byteArrayToString(byte[] bytes)
bytes
- byte array to be converted.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.