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
Modifier and Type | Method and Description |
---|---|
static void |
assertOwnership(IdentityService $this,
Party party,
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.
|
static Party |
requireWellKnownPartyFromAnonymous(IdentityService $this,
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. |
static Party |
wellKnownPartyFromAnonymous(IdentityService $this,
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. |
static Party |
wellKnownPartyFromAnonymous(IdentityService $this,
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. |
public static void assertOwnership(IdentityService $this, Party party, 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.
public static Party wellKnownPartyFromAnonymous(IdentityService $this, 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.
party
- identity to determine well known identity for.class Party
public static Party wellKnownPartyFromAnonymous(IdentityService $this, 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.
partyRef
- identity (and reference, which is unused) to determine well known identity for.class Party
,
class Party
,
class PartyAndReference
public static Party requireWellKnownPartyFromAnonymous(IdentityService $this, 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.
class Party