public final class AmService extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AmService.Builder
Builder of
AmService . |
Modifier and Type | Field and Description |
---|---|
static AmVersion |
DEFAULT_AM_VERSION
AM 5.0.0 (equivalent of OpenAM 14.0.0).
|
static String |
DEFAULT_COOKIE_NAME
The default cookie header name for the OpenAM Server.
|
Modifier and Type | Method and Description |
---|---|
static AmService.Builder |
builder(AmService amService)
Returns a new
AmService.Builder for creating a new AmService instance from a given one. |
static AmService.Builder |
builder(URI baseUri,
Handler amHandler,
Clock clock)
Returns a new
AmService.Builder for creating a new AmService instance. |
AuthenticationService |
getAuthenticationService()
Returns the service used to authenticate subjects to AM.
|
URI |
getBaseUri()
Return the base URI for this server.
|
String |
getCookieName()
Returns the cookie header name used by AM server.
|
Handler |
getHandler()
Returns the handler to use with this configuration.
|
Optional<NotificationService> |
getNotificationService()
Returns the AM notification service.
|
Realm |
getRealm()
Returns the realm to use with this configuration.
|
SessionService |
getSessionService()
Returns the
SessionService for this server. |
Optional<String> |
getUsername()
Returns the agent's username (if any).
|
Version |
getVersion()
Return the version of the configured OpenAM Server.
|
String |
json()
Build the endpoint URI for an endpoint located in the
/json namespace. |
String |
json(String endpoint)
Build the endpoint URI for an endpoint located in the
/json namespace. |
URI |
jsonUri()
Build the endpoint URI for an endpoint located in the
/json namespace. |
URI |
jsonUri(String endpoint)
Build the endpoint URI for an endpoint located in the
/json namespace. |
String |
oauth2(String endpoint)
Build the endpoint URI for an endpoint located in the
/oauth2 namespace. |
URI |
oauth2Uri(String endpoint)
Build the endpoint URI for an endpoint located in the
/oauth2 namespace. |
void |
start()
Starts this server instance (and associated services).
|
void |
stop()
Stops this server instance(and associated services).
|
String |
sts()
Returns the transformation endpoint located in the
/rest-sts namespace. |
String |
sts(String endpoint)
Returns the transformation endpoint located in the
/rest-sts namespace. |
URI |
stsUri(String endpoint)
Returns the URI of the transformation endpoint located in the
/rest-sts namespace. |
String |
uma(String endpoint)
Build the endpoint URI for an endpoint located in the
/uma namespace. |
URI |
umaUri(String endpoint)
Build the endpoint URI for an endpoint located in the
/uma namespace. |
public static final String DEFAULT_COOKIE_NAME
public static final AmVersion DEFAULT_AM_VERSION
public static AmService.Builder builder(URI baseUri, Handler amHandler, Clock clock)
AmService.Builder
for creating a new AmService
instance.baseUri
- AM base URI (ex: http://openam.example.com/openam), never null
.amHandler
- The handler to use the CrestSessionService
, not null
.clock
- The clock to use when dealing with timepublic static AmService.Builder builder(AmService amService)
AmService.Builder
for creating a new AmService
instance from a given one.amService
- The AmService
to copy.AmService
.public Handler getHandler()
public AuthenticationService getAuthenticationService()
public Optional<NotificationService> getNotificationService()
public Optional<String> getUsername()
public void start() throws Exception
Exception
- if startup failedpublic void stop()
public Realm getRealm()
public String getCookieName()
public URI getBaseUri()
public Version getVersion()
public SessionService getSessionService()
SessionService
for this server.SessionService
in use for this server.public String json()
/json
namespace.public String json(String endpoint)
/json
namespace.endpoint
- endpoint name, such as policies or /serverinfo/version. The endpoint MUST be a
proper encoded path.public URI jsonUri()
/json
namespace.public URI jsonUri(String endpoint)
/json
namespace.endpoint
- endpoint name, such as policies or /serverinfo/version. The endpoint MUST be a
proper encoded path.public String oauth2(String endpoint)
/oauth2
namespace.endpoint
- endpoint name, such as .well-known/openid-configuration or /authorize. The endpoint
MUST be a proper encoded path.public URI oauth2Uri(String endpoint)
/oauth2
namespace.endpoint
- endpoint name, such as .well-known/openid-configuration or /authorize. The endpoint
MUST be a proper encoded path.public String uma(String endpoint)
/uma
namespace.endpoint
- endpoint name, such as .well-known/uma-configuration or /authz_request. The
endpoint MUST be a proper encoded path.public String sts()
/rest-sts
namespace./rest-sts
namespace.public String sts(String endpoint)
/rest-sts
namespace.endpoint
- The endpoint name, such as rest-sts/username-transformer. The endpoint MUST be a proper
encoded path./rest-sts
namespace.public URI stsUri(String endpoint)
/rest-sts
namespace.endpoint
- The endpoint name, such as rest-sts/username-transformer. The endpoint MUST be a proper
encoded path.Copyright 2011-2017 ForgeRock AS.