public class DeconstructedPrincipal extends Object
valueOf(String, String)
Modifier | Constructor and Description |
---|---|
protected |
DeconstructedPrincipal(String primary,
String instance,
String realm)
Constructs a new DeconstructedPrincipal
|
Modifier and Type | Method and Description |
---|---|
String |
getInstance()
Gets the instance component of this DeconstructedPrincipal
|
String |
getNormalizedPrincipal()
Gets the constructed normalized principal for this DeconstructedPrincipal
The normalized principal is the combination of the primary, instance, and realm components:
primary/instance@realm
primary@realm
|
String |
getPrimary()
Gets the primary component of this DeconstructedPrincipal
|
String |
getPrincipalName()
Gets the constructed principal name for this DeconstructedPrincipal
The principal name is the combination of the primary and instance components:
primary/instance
primary
|
String |
getRealm()
Gets the realm component of this DeconstructedPrincipal
|
static DeconstructedPrincipal |
valueOf(String principal,
String defaultRealm)
Given a principal and a default realm, creates a new DeconstructedPrincipal
If the supplied principal does not have a realm component, the default realm (supplied) will be
used.
|
protected DeconstructedPrincipal(String primary, String instance, String realm)
primary
- a String containing the "primary" component of the principalinstance
- a String containing the "instance" component of the principalrealm
- a String containing the "realm" component of the principalpublic static DeconstructedPrincipal valueOf(String principal, @Nullable String defaultRealm)
principal
- a String containing the principal to deconstructdefaultRealm
- a String containing the default realmpublic String getPrimary()
public String getInstance()
public String getRealm()
public String getPrincipalName()
public String getNormalizedPrincipal()
Copyright © 2022 Apache Software Foundation. All rights reserved.