@Contract
public interface AdminAccessController
Modifier and Type | Interface and Description |
---|---|
static class |
AdminAccessController.Access
Represents the possible types of access granted as the result of
logging in as an admin user.
|
Modifier and Type | Method and Description |
---|---|
Subject |
loginAsAdmin(org.glassfish.grizzly.http.server.Request request)
Authenticates the admin user by delegating to the underlying realm.
|
Subject |
loginAsAdmin(org.glassfish.grizzly.http.server.Request request,
String hostname)
Authenticates the admin user by delegating to the underlying realm.
|
Subject |
loginAsAdmin(String user,
String password,
String realm,
String originHost)
Authenticates the admin user by delegating to the underlying realm.
|
Subject loginAsAdmin(String user, String password, String realm, String originHost) throws LoginException
Like the name suggests the method also ensures that the admin group membership is satisfied.
user
- String representing the user name of the user doing an admin opearationpassword
- String representing clear-text password of the user doing an admin operationrealm
- String representing the name of the admin realm for given serveroriginHost
- the host from which the request was sentLoginException
- if the credentials do not authenticateRemoteAdminAccessException
- if the request is remote but remote access is disabledSubject loginAsAdmin(org.glassfish.grizzly.http.server.Request request) throws LoginException
This variant also logs the requester in as an admin if the specified Principal matches the Principal from the certificate in the truststore associated with the alias configured in the domain configuration. Typically, methods invoking this variant should pass the Principal associated with the request as reported by the secure transport and the value from the X-GlassFish-admin header (null if no such header exists).
LoginException
- if the credentials do not authenticateRemoteAdminAccessException
- if the request is remote but remote access is disabledSubject loginAsAdmin(org.glassfish.grizzly.http.server.Request request, String hostname) throws LoginException
This variant also logs the requester in as an admin if the specified Principal matches the Principal from the certificate in the truststore associated with the alias configured in the domain configuration. Typically, methods invoking this variant should pass the Principal associated with the request as reported by the secure transport and the value from the X-GlassFish-admin header (null if no such header exists).
hostname
- the originating hostLoginException
- if the credentials do not authenticateRemoteAdminAccessException
- if the request is remote but remote access is disabledCopyright © 2021. All rights reserved.