Interface PrincipalNameResolver
- All Known Implementing Classes:
LdapIdentityProvider
public interface PrincipalNameResolver
Interface to obtain the name of the
Principal
from a
given ExternalIdentityRef
. The aim of this interface is to prevent
potentially unnecessary round trips associated with the following sequence:
String principalName = null; ExternalIdentity extId = externalIDP.getIdentity(externalIdentityRef); if (extId != null) { principalName = extid.getPrincipalName(); }This interface is expected to be implemented by
ExternalIdentityProvider
s,
that can deduce the principal name from the reference without the extra round trip.-
Method Summary
Modifier and TypeMethodDescription@NotNull String
fromExternalIdentityRef
(@NotNull ExternalIdentityRef externalIdentityRef) Deduce the name of thePrincipal
associated with theExternalIdentity
represented by the givenExternalIdentityRef
.
-
Method Details
-
fromExternalIdentityRef
@NotNull @NotNull String fromExternalIdentityRef(@NotNull @NotNull ExternalIdentityRef externalIdentityRef) throws ExternalIdentityException Deduce the name of thePrincipal
associated with theExternalIdentity
represented by the givenExternalIdentityRef
.- Parameters:
externalIdentityRef
- A validExternalIdentityRef
to an existingExternalIdentity
- Returns:
- The name of the
Principal
associated with the external identity referenced by the givenexternalIdentityRef
. - Throws:
ExternalIdentityException
- If the reference is not valid or another error occurs.
-