Modifier and Type | Method and Description |
---|---|
default boolean |
authenticated()
Whether the service was authenticated.
|
static ServicePrincipal |
forServiceNamed(String serviceName)
Get a service principal for the given named service.
|
default String |
serviceName()
The service name.
|
default String serviceName()
This may or may not be the same as Principal.getName()
, depending on whether the principal
represents the service itself, or simply a request made by the service on behalf of another
principal.
default boolean authenticated()
Some service identity strategies simply pull the service name from a header, which can be trivially spoofed. This can be used to distinguish whether the service identity has been established by an insecure means such as that, or a secure means such as client certificates, signed tokens or shared secrets.
static ServicePrincipal forServiceNamed(String serviceName)