|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtUtils
public class IDMappingExtUtils
Implementation for STS Mapping Extension Functions.
These functions can be called from XSLT mapping rules by declaring the
following in the root <xsl:stylesheet> element:
xmlns:mapping-ext="com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtUtils"
extension-element-prefixes="mapping-ext"
Then using the following format in the body of the mapping rule:
Field Summary | |
---|---|
static com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtCache |
_cache
|
static java.lang.String |
ALIAS_TYPE_OLD
|
static java.lang.String |
ALIAS_TYPE_PARTNER
|
static java.lang.String |
ALIAS_TYPE_SELF
|
static java.lang.String |
IDMappingExtUtils_java_copyright
|
static java.lang.String |
IDMappingExtUtils_java_sourceCodeID
|
Constructor Summary | |
---|---|
IDMappingExtUtils()
|
Method Summary | |
---|---|
static boolean |
addAliasForUser(java.lang.String fedContextId,
java.lang.String username,
java.lang.String alias)
addAliasForUser will store a mapping from the given federation context id and username to the given alias. |
static boolean |
addAliasForUser(java.lang.String fedContextId,
java.lang.String username,
java.lang.String alias,
java.lang.String aliasType)
addAliasForUser will store a mapping from the given federation context id and username to the given alias. |
static java.lang.String |
generateHmacSecretKey(int keyLength)
Generate Hmac Secret Key for the length specified. |
static java.lang.String |
getCurrentTimeStringUTC()
Returns the current time in UTC in XML format. |
static com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtCache |
getIDMappingExtCache()
|
protected static com.tivoli.am.fim.config.feds.EntityGroup |
getOTPEntityGroup(java.lang.String federationIdentifier)
Return the first entity group that its name or id matches the specified federation identifier. |
protected static java.util.Vector |
getQueryServiceAttributes(org.w3c.dom.Element e)
Recursively find any claims elements. |
static java.lang.String |
getSPSSessionData(java.lang.String key)
Retrieves a String value from the user's Single Sign-on Protocol Service (SPS) session based on a key |
static java.lang.String |
getSPSSessionID()
Returns an id that is guaranteed to be consistent across multiple federation contexts within the Single Sign-On Protocol Service (SPS). |
static java.lang.String |
getTimeStringUTC(int year,
int month,
int day,
int hour,
int minute,
int second)
Constructs a time string in XML format based on the specified year, month, day, hour, minute and second. |
static java.lang.String |
lookupAliasesForUserAsDelimitedString(java.lang.String fedContextId,
java.lang.String username,
java.lang.String delimiter)
Returns the list of aliases associated with a given username within a given federation context id. |
static java.lang.String |
lookupAliasesForUserAsDelimitedString(java.lang.String fedContextId,
java.lang.String username,
java.lang.String delimiter,
java.lang.String aliasType)
Returns the list of aliases associated with a given username within a given federation context id. |
static java.lang.String[] |
lookupAliasesForUserAsStringArray(java.lang.String fedContextId,
java.lang.String username)
Returns the list of aliases associated with a given username within a given federation context id. |
static java.lang.String[] |
lookupAliasesForUserAsStringArray(java.lang.String fedContextId,
java.lang.String username,
java.lang.String aliasType)
Returns the list of aliases associated with a given username within a given federation context id. |
static java.lang.String |
lookupUserFromAlias(java.lang.String fedContextId,
java.lang.String alias)
Finds and returns the user associated with the given alias within the given federation context id (scope of the alias->username mapping). |
static java.lang.String |
lookupUserFromAlias(java.lang.String fedContextId,
java.lang.String alias,
java.lang.String aliasType)
Finds and returns the user associated with the given alias within the given federation context id (scope of the alias->username mapping). |
static QueryServiceAttribute[] |
parseQueryServiceAttributes(java.lang.String claimsNode)
Recursively searches the XML contained in the passed-in string looking for elements which have this format: <fimqs:Attribute xmlns:fimqs="urn:ibm:names:ITFIM:queryservice" name="openid.sreg.email" type="whatever"e optional="true" /> If it finds elements that match this qname, they will be added to the result set. |
static com.tivoli.am.fim.trustserver.sts.utilities.InfoCardClaim[] |
parseRequestedClaims(java.lang.String claimsNode)
Recursively searches the XML contained in the passed-in string looking for elements which have this format: <wsid:ClaimType xmlns:wsid="http://schemas.xmlsoap.org/ws/2005/05/identity" Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" Optional="true" /> If it finds elements that match this qname, they will be added to the result set. |
static boolean |
removeAliasForUser(java.lang.String fedContextId,
java.lang.String username,
java.lang.String alias)
removeAliasForUser will remove a mapping from the given federation context id and username for the given alias. |
static boolean |
removeAliasForUser(java.lang.String fedContextId,
java.lang.String username,
java.lang.String alias,
java.lang.String aliasType)
removeAliasForUser will remove a mapping from the given federation context id and username for the given alias. |
static java.lang.String |
removeSecretKey(java.lang.String otpFederation,
java.lang.String userInfoProviderType,
java.lang.String user,
java.lang.String secretKeyName,
java.lang.String secretKeyNamespace)
Stores the secret key for a user given the secretKeyName, secretKeyNamespace and secretKeyDatatype. |
static java.lang.String |
removeSPSSessionData(java.lang.String key)
Removes a String value from the user's Single Sign-on Protocol Service (SPS) session based on a key |
static java.lang.String |
retrieveSecretKey(java.lang.String otpFederation,
java.lang.String userInfoProviderType,
java.lang.String user,
java.lang.String secretKeyName,
java.lang.String secretKeyNamespace)
Stores the secret key for a user given the secretKeyName, secretKeyNamespace and secretKeyDatatype. |
static void |
setSPSSessionData(java.lang.String key,
java.lang.String value)
Stores a key/value String pair in the user's Single Sign-on Protocol Service (SPS) session |
static void |
storeSecretKey(java.lang.String otpFederation,
java.lang.String userInfoProviderType,
java.lang.String user,
java.lang.String secretKeyName,
java.lang.String secretKeyNamespace,
java.lang.String value)
Stores the secret key for a user given the secretKeyName, secretKeyNamespace and secretKeyDatatype. |
static java.lang.String |
subStringAfterLast(java.lang.String text,
java.lang.String chars)
Returns the substring of text after the last occurence of chars. |
static java.lang.String |
subStringBeforeLast(java.lang.String text,
java.lang.String chars)
Returns the substring of text before the last occurence of chars. |
static void |
throwSTSException(java.lang.String message)
Used to throw STS Messages from XLST/Javascript mapping rules. |
static void |
throwSTSUserMessageException(java.lang.String message)
Used to throw STSUserMessageException from XSLT/Javascript mapping rules The error message of this exception is displayed in the response to the client. |
static void |
traceString(java.lang.String str)
Provides a convenient tracing mechanism for XSLT authors. |
static java.lang.String |
translatePPID(java.lang.String ppid)
Tranlates a base64 encoded PPID string into a friendly display format according to the Information Card specifications. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String IDMappingExtUtils_java_sourceCodeID
public static final java.lang.String IDMappingExtUtils_java_copyright
public static final java.lang.String ALIAS_TYPE_SELF
public static final java.lang.String ALIAS_TYPE_PARTNER
public static final java.lang.String ALIAS_TYPE_OLD
public static com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtCache _cache
Constructor Detail |
---|
public IDMappingExtUtils()
Method Detail |
---|
public static void throwSTSException(java.lang.String message) throws com.tivoli.am.fim.trustserver.sts.STSException
message
-
com.tivoli.am.fim.trustserver.sts.STSException
public static void throwSTSUserMessageException(java.lang.String message) throws com.tivoli.am.fim.trustserver.sts.utilities.STSUserMessageException
message
-
com.tivoli.am.fim.trustserver.sts.utilities.STSUserMessageException
public static java.lang.String translatePPID(java.lang.String ppid)
ppid
-
public static java.lang.String subStringAfterLast(java.lang.String text, java.lang.String chars)
text
- chars
-
public static java.lang.String subStringBeforeLast(java.lang.String text, java.lang.String chars)
text
- chars
-
public static com.tivoli.am.fim.trustserver.sts.utilities.InfoCardClaim[] parseRequestedClaims(java.lang.String claimsNode)
<wsid:ClaimType xmlns:wsid="http://schemas.xmlsoap.org/ws/2005/05/identity" Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" Optional="true" />If it finds elements that match this qname, they will be added to the result set. If the passed in string cannot be parsed as XML, an empty array will be returned.
claimsNode
-
public static QueryServiceAttribute[] parseQueryServiceAttributes(java.lang.String claimsNode)
<fimqs:Attribute xmlns:fimqs="urn:ibm:names:ITFIM:queryservice" name="openid.sreg.email" type="whatever"e optional="true" />If it finds elements that match this qname, they will be added to the result set. If the passed in string cannot be parsed as XML, an empty array will be returned.
claimsNode
-
protected static java.util.Vector getQueryServiceAttributes(org.w3c.dom.Element e)
e
-
public static boolean addAliasForUser(java.lang.String fedContextId, java.lang.String username, java.lang.String alias) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idusername
- - the TFIM usernamealias
- - the alias to associate with the username within the given
federation context id
com.tivoli.am.fim.trustserver.sts.STSException
public static boolean addAliasForUser(java.lang.String fedContextId, java.lang.String username, java.lang.String alias, java.lang.String aliasType) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idusername
- - the TFIM usernamealias
- - the alias to associate with the username within the given
federation context idaliasType
- - the type of alias to add. Must be "self", "partner", or
"old".
com.tivoli.am.fim.trustserver.sts.STSException
public static boolean removeAliasForUser(java.lang.String fedContextId, java.lang.String username, java.lang.String alias) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idusername
- - the TFIM usernamealias
- - the alias associated with the username within the given
federation context id
com.tivoli.am.fim.trustserver.sts.STSException
public static boolean removeAliasForUser(java.lang.String fedContextId, java.lang.String username, java.lang.String alias, java.lang.String aliasType) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idusername
- - the TFIM usernamealias
- - the alias associated with the username within the given
federation context idaliasType
- - the type of alias to remove, must be "self", "partner", or
"old".
com.tivoli.am.fim.trustserver.sts.STSException
public static java.lang.String lookupUserFromAlias(java.lang.String fedContextId, java.lang.String alias) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idalias
- - the alias of the associated user within the given federation
context id
com.tivoli.am.fim.trustserver.sts.STSException
public static java.lang.String lookupUserFromAlias(java.lang.String fedContextId, java.lang.String alias, java.lang.String aliasType) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idalias
- - the alias of the associated user within the given federation
context idaliasType
- - the type of alias to search for. Valid values are "self",
"parnter", or "old".
com.tivoli.am.fim.trustserver.sts.STSException
public static java.lang.String[] lookupAliasesForUserAsStringArray(java.lang.String fedContextId, java.lang.String username) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idusername
- - the username for which to search for aliases
com.tivoli.am.fim.trustserver.sts.STSException
public static java.lang.String[] lookupAliasesForUserAsStringArray(java.lang.String fedContextId, java.lang.String username, java.lang.String aliasType) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idusername
- - the username for which to search for aliasesaliasType
- - the type of alias to search.
com.tivoli.am.fim.trustserver.sts.STSException
public static java.lang.String lookupAliasesForUserAsDelimitedString(java.lang.String fedContextId, java.lang.String username, java.lang.String delimiter) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idusername
- - the username for which to search for aliasesdelimiter
- - the string delimiter to put between aliases in the return
value
com.tivoli.am.fim.trustserver.sts.STSException
public static java.lang.String lookupAliasesForUserAsDelimitedString(java.lang.String fedContextId, java.lang.String username, java.lang.String delimiter, java.lang.String aliasType) throws com.tivoli.am.fim.trustserver.sts.STSException
fedContextId
- - the federation context idusername
- - the username for which to search for aliasesdelimiter
- - the string delimiter to put between aliases in the return
valuealiasType
- - the type of alias to lookup
com.tivoli.am.fim.trustserver.sts.STSException
public static void traceString(java.lang.String str)
str
- - String to tracepublic static java.lang.String getCurrentTimeStringUTC()
public static java.lang.String getTimeStringUTC(int year, int month, int day, int hour, int minute, int second)
year
- month
- day
- hour
- minute
- second
- timeZone
-
public static com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtCache getIDMappingExtCache()
public static java.lang.String getSPSSessionID()
public static void setSPSSessionData(java.lang.String key, java.lang.String value)
key
- the key used to store the entryvalue
- the value to store in the user's sessionpublic static java.lang.String getSPSSessionData(java.lang.String key)
key
- the key used to retrieve the entry
public static java.lang.String removeSPSSessionData(java.lang.String key)
key
- the key used to remove the entry
public static java.lang.String generateHmacSecretKey(int keyLength) throws com.tivoli.am.fim.trustserver.sts.STSException
keyLengh
- the length of the key to generate. The
keyLength should be multiples of 5.
com.tivoli.am.fim.trustserver.sts.STSException
public static void storeSecretKey(java.lang.String otpFederation, java.lang.String userInfoProviderType, java.lang.String user, java.lang.String secretKeyName, java.lang.String secretKeyNamespace, java.lang.String value) throws com.tivoli.am.fim.trustserver.sts.STSException
otpFederation
- - OTP federation name or group id.userInfoProviderType
- - OTP user info provider type.user
- - user namesecretKeyName
- - secret key attribute name.secretKeyNamespace
- - secret key attribute namespace.secretKeyDatatype
- - secret key attribute datatype.
com.tivoli.am.fim.trustserver.sts.STSException
public static java.lang.String retrieveSecretKey(java.lang.String otpFederation, java.lang.String userInfoProviderType, java.lang.String user, java.lang.String secretKeyName, java.lang.String secretKeyNamespace) throws com.tivoli.am.fim.trustserver.sts.STSException
otpFederation
- - OTP federation name or group id.userInfoProviderType
- - OTP user info provider type.user
- - user namesecretKeyName
- - secret key attribute name.secretKeyNamespace
- - secret key attribute namespace.secretKeyDatatype
- - secret key attribute datatype.
com.tivoli.am.fim.trustserver.sts.STSException
public static java.lang.String removeSecretKey(java.lang.String otpFederation, java.lang.String userInfoProviderType, java.lang.String user, java.lang.String secretKeyName, java.lang.String secretKeyNamespace) throws com.tivoli.am.fim.trustserver.sts.STSException
otpFederation
- - OTP federation name or group id.userInfoProviderType
- - OTP user info provider type.user
- - user namesecretKeyName
- - secret key attribute name.secretKeyNamespace
- - secret key attribute namespace.secretKeyDatatype
- - secret key attribute datatype.
com.tivoli.am.fim.trustserver.sts.STSException
protected static com.tivoli.am.fim.config.feds.EntityGroup getOTPEntityGroup(java.lang.String federationIdentifier)
federationIdentifier
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |