public class WSFederationMetaManager extends Object
WSFederationMetaManager
provides methods to manage both the
standard entity descriptor and the extended entity configuration.Constructor and Description |
---|
WSFederationMetaManager() |
WSFederationMetaManager(Object callerToken) |
Modifier and Type | Method and Description |
---|---|
void |
createEntityConfig(String realm,
FederationConfigElement config)
Creates the extended entity configuration under the realm.
|
void |
createFederation(String realm,
FederationElement federation)
Creates the standard metadata entity descriptor under the realm.
|
void |
deleteEntityConfig(String realm,
String federationId)
Deletes the extended entity configuration under the realm.
|
void |
deleteFederation(String realm,
String federationId)
Deletes the standard metadata entity descriptor under the realm.
|
Set<String> |
getAllEntities(String realm)
Returns all entities under the realm.
|
List<String> |
getAllHostedEntities(String realm)
Returns all hosted entities under the realm.
|
List<String> |
getAllHostedIdentityProviderEntities(String realm)
Returns all hosted identity provider entities under the realm.
|
List<String> |
getAllHostedIdentityProviderMetaAliases(String realm)
Returns metaAliases of all hosted identity providers under the realm.
|
List<String> |
getAllHostedMetaAliasesByRealm(String realm)
Returns all the hosted entity metaAliases for a realm.
|
List |
getAllHostedServiceProviderEntities(String realm)
Returns all hosted service provider entities under the realm.
|
List<String> |
getAllHostedServiceProviderMetaAliases(String realm)
Returns metaAliases of all hosted service providers under the realm.
|
List<String> |
getAllRemoteEntities(String realm)
Returns all remote entities under the realm.
|
List<String> |
getAllRemoteIdentityProviderEntities(String realm)
Returns all remote identity provider entities under the realm.
|
List<String> |
getAllRemoteServiceProviderEntities(String realm)
Returns all remote service provider entities under the realm.
|
BaseConfigType |
getBaseConfig(String realm,
String federationId)
Returns first identity provider's SSO configuration in an entity under
the realm.
|
String |
getEntityByMetaAlias(String metaAlias)
Returns entity ID associated with the metaAlias.
|
String |
getEntityByTokenIssuerName(String realm,
String issuer)
Returns entity ID associated with the token issuer name.
|
FederationConfigElement |
getEntityConfig(String realm,
String federationId)
Returns extended entity configuration under the realm.
|
FederationElement |
getEntityDescriptor(String realm,
String entityId)
Returns the standard metadata federation element under the realm.
|
IDPSSOConfigElement |
getIDPSSOConfig(String realm,
String federationId)
Returns first identity provider's SSO configuration in an entity under
the realm.
|
String |
getRoleByMetaAlias(String metaAlias)
Returns role of an entity based on its metaAlias.
|
SPSSOConfigElement |
getSPSSOConfig(String realm,
String federationId)
Returns first service provider's SSO configuration in an entity under
the realm.
|
String |
getTokenIssuerEndpoint(FederationElement fed)
Returns the value of the
<TokenIssuerEndpoint> element
for the given entity. |
String |
getTokenIssuerName(FederationElement fed)
Returns the value of the
<TokenIssuerName> element
for the given entity. |
byte[] |
getTokenSigningCertificate(FederationElement fed)
Returns the value of the
<TokenSigningCertificate>
element for the given entity. |
UriNamedClaimTypesOfferedElement |
getUriNamedClaimTypesOffered(FederationElement fed)
Returns the value of the
<UriNamedClaimTypesOffered>
element for the given entity. |
boolean |
isTrustedProvider(String realm,
String federationId,
String trustedEntityId)
Determines whether two entities are in the same circle of trust
under the realm.
|
void |
setEntityConfig(String realm,
FederationConfigElement config)
Sets the extended entity configuration under the realm.
|
void |
setFederation(String realm,
FederationElement federation)
Sets the standard metadata entity descriptor under the realm.
|
void |
validateMetaAliasForNewEntity(String realm,
List<String> newMetaAliases)
Checks that the provided metaAliases are valid for a new hosted entity in the specified realm.
|
public WSFederationMetaManager() throws WSFederationMetaException
WSFederationMetaException
public WSFederationMetaManager(Object callerToken) throws WSFederationMetaException
WSFederationMetaException
public FederationElement getEntityDescriptor(String realm, String entityId) throws WSFederationMetaException
realm
- The realm under which the federation resides.entityId
- ID of the federation to be retrieved.FederationElement
for the entity or null if
not found.WSFederationMetaException
- if unable to retrieve the entity
descriptor.public void setFederation(String realm, FederationElement federation) throws WSFederationMetaException
realm
- The realm under which the entity resides.federation
- Federation object.WSFederationMetaException
- if unable to set the entity descriptor.public void createFederation(String realm, FederationElement federation) throws WSFederationMetaException
realm
- The realm under which the entity descriptor will be
created.federation
- The standard entity descriptor object to be created.WSFederationMetaException
- if unable to create the entity
descriptor.public void deleteFederation(String realm, String federationId) throws WSFederationMetaException
realm
- The realm under which the entity resides.federationId
- The ID of the entity for whom the standard entity
descriptor will be deleted.WSFederationMetaException
- if unable to delete the entity
descriptor.public FederationConfigElement getEntityConfig(String realm, String federationId) throws WSFederationMetaException
realm
- The realm under which the entity resides.federationId
- ID of the entity to be retrieved.FederationConfigElement
object for the entity or
null if not found.WSFederationMetaException
- if unable to retrieve the entity
configuration.public SPSSOConfigElement getSPSSOConfig(String realm, String federationId) throws WSFederationMetaException
realm
- The realm under which the entity resides.federationId
- ID of the entity to be retrieved.SPSSOConfigElement
for the entity or null if not
found.WSFederationMetaException
- if unable to retrieve the first service
provider's SSO configuration.public IDPSSOConfigElement getIDPSSOConfig(String realm, String federationId) throws WSFederationMetaException
realm
- The realm under which the entity resides.federationId
- ID of the entity to be retrieved.IDPSSOConfigElement
for the entity or null if not
found.WSFederationMetaException
- if unable to retrieve the first
identity provider's SSO configuration.public BaseConfigType getBaseConfig(String realm, String federationId) throws WSFederationMetaException
realm
- The realm under which the entity resides.federationId
- ID of the entity to be retrieved.BaseConfigElement
for the entity or null if not
found.WSFederationMetaException
- if unable to retrieve the first
identity provider's SSO configuration.public void setEntityConfig(String realm, FederationConfigElement config) throws WSFederationMetaException
realm
- The realm under which the entity resides.config
- The extended entity configuration object to be set.WSFederationMetaException
- if unable to set the entity
configuration.public void createEntityConfig(String realm, FederationConfigElement config) throws WSFederationMetaException
realm
- The realm under which the entity configuration will be
created.config
- The extended entity configuration object to be created.WSFederationMetaException
- if unable to create the entity
configuration.public void deleteEntityConfig(String realm, String federationId) throws WSFederationMetaException
realm
- The realm under which the entity resides.federationId
- The ID of the entity for whom the extended entity
configuration will be deleted.WSFederationMetaException
- if unable to delete the entity
descriptor.public void validateMetaAliasForNewEntity(String realm, List<String> newMetaAliases) throws WSFederationMetaException
realm
- The realm in which we are validating the metaAliases.newMetaAliases
- values we are using to create the new metaAliases.WSFederationMetaException
- if duplicate values found.public List<String> getAllHostedMetaAliasesByRealm(String realm) throws WSFederationMetaException
realm
- The given realm.WSFederationMetaException
- if unable to retrieve the entity ids.public List<String> getAllHostedEntities(String realm) throws WSFederationMetaException
realm
- The realm under which the hosted entities reside.List
of entity ID String
.WSFederationMetaException
- if unable to retrieve the entity ids.public List getAllHostedServiceProviderEntities(String realm) throws WSFederationMetaException
realm
- The realm under which the hosted service provider entities
reside.List
of entity ID String
.WSFederationMetaException
- if unable to retrieve the entity ids.public List<String> getAllHostedIdentityProviderEntities(String realm) throws WSFederationMetaException
realm
- The realm under which the hosted identity provider entities
reside.List
of entity ID String
.WSFederationMetaException
- if unable to retrieve the entity ids.public List<String> getAllRemoteEntities(String realm) throws WSFederationMetaException
realm
- The realm under which the hosted entities reside.List
of entity ID String
.WSFederationMetaException
- if unable to retrieve the entity ids.public List<String> getAllRemoteServiceProviderEntities(String realm) throws WSFederationMetaException
realm
- The realm under which the remote service provider entities
reside.List
of entity ID String
.WSFederationMetaException
- if unable to retrieve the entity ids.public List<String> getAllRemoteIdentityProviderEntities(String realm) throws WSFederationMetaException
realm
- The realm under which the remote identity provider entities
reside.List
of entity ID String
.WSFederationMetaException
- if unable to retrieve the entity ids.public String getEntityByMetaAlias(String metaAlias) throws WSFederationMetaException
metaAlias
- The metaAlias.WSFederationMetaException
- if unable to retrieve the entity ids.public String getEntityByTokenIssuerName(String realm, String issuer) throws WSFederationMetaException
issuer
- Token issuer name.WSFederationMetaException
- if unable to retrieve the entity ids.public String getRoleByMetaAlias(String metaAlias) throws WSFederationMetaException
metaAlias
- Meta alias of the entity.SAML2Constants.IDP_ROLE
; or
SAML2Constants.SP_ROLE
or
SAML2Constants.UNKNOWN_ROLE
WSFederationMetaException
- if there are issues in getting the
entity profile from the meta alias.public List<String> getAllHostedIdentityProviderMetaAliases(String realm) throws WSFederationMetaException
realm
- The realm under which the identity provider metaAliases
reside.List
of metaAliases String
.WSFederationMetaException
- if unable to retrieve meta aliases.public List<String> getAllHostedServiceProviderMetaAliases(String realm) throws WSFederationMetaException
realm
- The realm under which the service provider metaAliases
reside.List
of metaAliases String
.WSFederationMetaException
- if unable to retrieve meta aliases.public boolean isTrustedProvider(String realm, String federationId, String trustedEntityId) throws WSFederationMetaException
realm
- The realm under which the entity resides.federationId
- The ID of the entitytrustedEntityId
- The ID of the entityWSFederationMetaException
- if unable to determine the trusted
relationship.public Set<String> getAllEntities(String realm) throws WSFederationMetaException
realm
- The realm under which the entities reside.Set
of entity ID String
.WSFederationMetaException
- if unable to retrieve the entity ids.public String getTokenIssuerEndpoint(FederationElement fed)
<TokenIssuerEndpoint>
element
for the given entity.fed
- The standard metadata for the entity.<TokenIssuerEndpoint>
elementpublic String getTokenIssuerName(FederationElement fed)
<TokenIssuerName>
element
for the given entity.fed
- The standard metadata for the entity.<TokenIssuerName>
elementpublic byte[] getTokenSigningCertificate(FederationElement fed)
<TokenSigningCertificate>
element for the given entity.fed
- The standard metadata for the entity.<TokenSigningCertificate>
elementpublic UriNamedClaimTypesOfferedElement getUriNamedClaimTypesOffered(FederationElement fed)
<UriNamedClaimTypesOffered>
element for the given entity.fed
- The standard metadata for the entity.UriNamedClaimTypesOfferedElement
containing the
offered claim types.
<UriNamedClaimTypesOffered>
elementCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.