public static class IdentityService.DefaultImpls
An identity service maintains a directory of parties by their associated distinguished name/public keys and thus supports lookup of a party given its key, or name. The service also manages the certificates linking confidential identities back to the well known identity.
Well known identities in Corda are the public identity of a party, registered with the network map directory,
whereas confidential identities are distributed only on a need to know basis (typically between parties in
a transaction being built). See interface NetworkMapCache
for retrieving well known identities from the network map.
interface NetworkMapCache
public static void assertOwnership(IdentityService $this, @NotNull Party party, @NotNull AnonymousParty anonymousParty)
Asserts that an anonymous party maps to the given full party, by looking up the certificate chain associated with the anonymous party and resolving it back to the given full party.
UnknownAnonymousPartyException
- if the anonymous party is not owned by the full party.@Nullable public static Party wellKnownPartyFromAnonymous(IdentityService $this, @NotNull AbstractParty party)
Resolves a (optionally) confidential identity to the corresponding well known identity class Party
.
It transparently handles returning the well known identity back if a well known identity is passed in.
$this
- identity to determine well known identity for.party
- identity to determine well known identity for.class Party
@Nullable public static Party wellKnownPartyFromAnonymous(IdentityService $this, @NotNull PartyAndReference partyRef)
Resolves a (optionally) confidential identity to the corresponding well known identity class Party
.
Convenience method which unwraps the class Party
from the class PartyAndReference
and then resolves the
well known identity as normal.
It transparently handles returning the well known identity back if a well known identity is passed in.
$this
- identity (and reference, which is unused) to determine well known identity for.partyRef
- identity (and reference, which is unused) to determine well known identity for.class Party
,
class Party
,
class PartyAndReference
@NotNull public static Party requireWellKnownPartyFromAnonymous(IdentityService $this, @NotNull AbstractParty party)
Resolve the well known identity of a party. Throws an exception if the party cannot be identified.
If the party passed in is already a well known identity (i.e. a class Party
) this returns it as-is.
IllegalArgumentException
class Party