public abstract class PeerIdentityContext extends Object
Modifier | Constructor and Description |
---|---|
protected |
PeerIdentityContext()
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
abstract PeerIdentity |
authenticate(AuthenticationConfiguration authenticationConfiguration)
Authenticate a new peer identity.
|
protected <I> I |
constructIdentity(Function<PeerIdentity.Configuration,I> constructFunction)
Construct a new peer identity.
|
PeerIdentity |
getCurrentIdentity()
Get the currently set peer identity for this context.
|
boolean |
owns(PeerIdentity identity)
Determine whether this context owns the given identity.
|
public PeerIdentity getCurrentIdentity()
null
if no identity is setpublic abstract PeerIdentity authenticate(AuthenticationConfiguration authenticationConfiguration) throws AuthenticationException
ReauthenticationException
may be
thrown at a later time.authenticationConfiguration
- the authentication configuration to useAuthenticationException
- if an immediate authentication error occursprotected final <I> I constructIdentity(Function<PeerIdentity.Configuration,I> constructFunction)
PeerIdentity
class. This object must not be
retained or made available after the identity is constructed; such misuse may result in an exception or undefined
behavior.constructFunction
- a function that, when applied, constructs a new peer identitypublic final boolean owns(PeerIdentity identity)
identity
- the identitytrue
if this context owns the identity, false
otherwiseCopyright © 2020 JBoss by Red Hat. All rights reserved.