public class AccountUtils extends Object
AccountUtils
is a utility class for
setting and retrieving the SAML2 account federation information.
Constructor and Description |
---|
AccountUtils() |
Modifier and Type | Method and Description |
---|---|
static Map<String,Set<String>> |
convertToAttributes(NameIDInfo info,
NameIDInfoKey infoKey)
Converts the provided NameIDInfo and NameIDInfoKey to a Map<String, Set<String>> structure.
|
static NameIDInfo |
getAccountFederation(String userID,
String hostEntityID,
String remoteEntityID)
Returns the account federation information of a user for the given
identity provider and a service provider.
|
static String |
getNameIDInfoAttribute()
Returns the SAML2 Name Identifier Info attribute name.
|
static String |
getNameIDInfoKeyAttribute()
Returns the SAML2 Name Identifier InfoKey attribute name.
|
static boolean |
removeAccountFederation(NameIDInfo info,
String userID)
Removes the account federation of a user.
|
static void |
setAccountFederation(NameIDInfo info,
String userID)
Sets the account federation information to the datastore for a user.
|
public static NameIDInfo getAccountFederation(String userID, String hostEntityID, String remoteEntityID) throws SAML2Exception
userID
- user id for which account federation needs to be returned.hostEntityID
- EntityID
of the hosted entity.remoteEntityID
- EntityID
of the remote entity.SAML2Exception
- if account federation retrieval is failed.public static void setAccountFederation(NameIDInfo info, String userID) throws SAML2Exception
info
- NameIDInfo
object to be set.userID
- user identifier for which the account federation to be set.SAML2Exception
- if any failure.public static Map<String,Set<String>> convertToAttributes(NameIDInfo info, NameIDInfoKey infoKey) throws SAML2Exception
info
- The NameIDInfo.infoKey
- The NameIDInfoKey.SAML2Exception
- If there was a problem whilst creating NameIDInfoKey.public static boolean removeAccountFederation(NameIDInfo info, String userID) throws SAML2Exception
info
- NameIDInfo
object.userID
- user identifie for which the account federation needs to
be removed.SAML2Exception
- if any failure.public static String getNameIDInfoAttribute()
public static String getNameIDInfoKeyAttribute()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.