Class AccountUtils
- java.lang.Object
-
- com.sun.identity.wsfederation.common.AccountUtils
-
public class AccountUtils extends Object
AccountUtilsis a utility class for setting and retrieving theWS-Federationaccount federation information.
-
-
Constructor Summary
Constructors Constructor Description AccountUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NameIDInfogetAccountFederation(String userID, String hostEntityID, String remoteEntityID)Returns the account federation information of a user for the given identity provider and a service provider.static StringgetNameIDInfoAttribute()Returns the WS-Federation Name Identifier Info attribute name.static StringgetNameIDInfoKeyAttribute()Returns the WS-Federation Name Identifier InfoKey attribute name.static booleanremoveAccountFederation(NameIDInfo info, String userID)Removes the account federation of a user.static voidsetAccountFederation(NameIDInfo info, String userID)Sets the account federation information in the datastore for a user.
-
-
-
Method Detail
-
getAccountFederation
public static NameIDInfo getAccountFederation(String userID, String hostEntityID, String remoteEntityID) throws WSFederationException
Returns the account federation information of a user for the given identity provider and a service provider.- Parameters:
userID- user id for which account federation needs to be returned.hostEntityID-EntityIDof the hosted entity.remoteEntityID-EntityIDof the remote entity.- Returns:
- the account federation info object. null if the account federation does not exist.
- Throws:
WSFederationException- if account federation retrieval failed.
-
setAccountFederation
public static void setAccountFederation(NameIDInfo info, String userID) throws WSFederationException
Sets the account federation information in the datastore for a user.- Parameters:
info-NameIDInfoobject to be set.userID- user identifier for which the account federation to be set.- Throws:
WSFederationException- if any failure.
-
removeAccountFederation
public static boolean removeAccountFederation(NameIDInfo info, String userID) throws WSFederationException
Removes the account federation of a user.- Parameters:
info-NameIDInfoobject.userID- user identifier for which the account federation is to be removed.- Returns:
- true if the account federation is removed successfully.
- Throws:
WSFederationException- if any failure.
-
getNameIDInfoAttribute
public static String getNameIDInfoAttribute()
Returns the WS-Federation Name Identifier Info attribute name.- Returns:
- the WS-Federation Name Identifier Info attribute name.
-
getNameIDInfoKeyAttribute
public static String getNameIDInfoKeyAttribute()
Returns the WS-Federation Name Identifier InfoKey attribute name.- Returns:
- the WS-Federation Name Identifier InfoKey attribute name.
-
-