public final class OpenAmServer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OpenAmServer.OpenAmVersion
The version of the OpenAM server being used by this instance.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_COOKIE_NAME
The default cookie header name for the OpenAM Server.
|
Constructor and Description |
---|
OpenAmServer(String uri,
String realm)
Creates a configuration for the OpenAM server using default
'iPlanetDirectoryPro' cookie header name.
|
OpenAmServer(String uri,
String realm,
String cookieName,
OpenAmServer.OpenAmVersion version)
Creates a configuration for the OpenAM server.
|
OpenAmServer(URI uri,
Realm realm,
String cookieName,
OpenAmServer.OpenAmVersion version)
Creates a configuration for the OpenAM server.
|
OpenAmServer(URI uri,
String realm,
String cookieName)
Creates a configuration for the OpenAM server.
|
Modifier and Type | Method and Description |
---|---|
URI |
getBaseUri()
Return the base URI for this server.
|
String |
getCookieName()
Returns the cookie header name used by AM server.
|
Realm |
getRealm()
Returns the realm to use with this configuration.
|
OpenAmServer.OpenAmVersion |
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. |
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 OpenAmServer(String uri, String realm)
uri
- The URI to the OpenAM server, not null
, such as https://openam.example.com:8443/openam/.realm
- The realm to use, such as finances. Default is 'root'(or '/') if this field is set to
null
.public OpenAmServer(String uri, String realm, String cookieName, OpenAmServer.OpenAmVersion version)
uri
- The URI to the OpenAM server, not null
, such as https://openam.example.com:8443/openam/.realm
- The realm to use, such as finances. Default is 'root' (or '/') if this field is set to
null
.cookieName
- The cookie header name to use with this server. Default is 'iPlanetDirectoryPro' if
this field is set to null
.version
- The version of OpenAM that this instance represents. Default is OpenAmServer.OpenAmVersion.DEFAULT_AM_VERSION
if this field is set to null
.public OpenAmServer(URI uri, String realm, String cookieName)
uri
- The URI to the OpenAM server, not null
, such as https://openam.example.com:8443/openam/.realm
- The realm to use, such as finances. Default is 'root'(or '/') if this field is set to
null
.cookieName
- The cookie header name to use with this server. Default is 'iPlanetDirectoryPro' if this field is set to
null
.public OpenAmServer(URI uri, Realm realm, String cookieName, OpenAmServer.OpenAmVersion version)
uri
- The URI to the OpenAM server, not null
, such as https://openam.example.com:8443/openam/.realm
- The realm to use, such as finances. Default is 'root' (or '/') if this field is set to
null
.cookieName
- The cookie header name to use with this server. Default is 'iPlanetDirectoryPro' if
this field is set to null
.version
- The version of OpenAM that this instance represents. Default is OpenAmServer.OpenAmVersion.DEFAULT_AM_VERSION
if this field is set to null
.public Realm getRealm()
public String getCookieName()
public URI getBaseUri()
public OpenAmServer.OpenAmVersion getVersion()
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.