Class GlobalSecurityManagerRest
- java.lang.Object
-
- de.aristaflow.ilm.ws.rest.base.service.AbstractSubResource<GlobalSecurityManagerWebService>
-
- de.aristaflow.ilm.ws.rest.base.security.GlobalSecurityManagerRest
-
@Produces("application/json") @Consumes("application/json") public class GlobalSecurityManagerRest extends AbstractSubResource<GlobalSecurityManagerWebService>
- See Also:
GlobalSecurityManagerWebService
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
SET_COOKIE_EXAMPLE
The example string for a setting a session token cookie.protected static String
UNSET_COOKIE_EXAMPLE
The example string for a unsetting a session token cookie.
-
Constructor Summary
Constructors Constructor Description GlobalSecurityManagerRest(GlobalSecurityManagerWebService service, de.aristaflow.adept2.base.communication.rest.RequestHandler reqHandler, de.aristaflow.adept2.base.communication.rest.ResponseHandler respHandler, de.aristaflow.adept2.base.communication.rest.ExceptionHandler excpHandler, de.aristaflow.adept2.base.communication.rest.ServiceResourceConfig srConf, Supplier<com.fasterxml.jackson.databind.ObjectMapper> objectMapper, UnaryOperator<Exception> headerDataExcpAdapter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull List<@Valid ClientSessionDetails>
authenticateAll(@NotBlank String userName, Long orgPosId, @NotNull URI callerUri, String password)
This method authenticates with either the designated password or the OAuth2 authentication token retrieved from the request header using the designated org position or all org positions occupied by the agent if not provided.@NotNull List<@Valid ClientSessionDetails>
authenticateAllMethod(@NotBlank String method, @NotNull URI callerUri, List<@NotNull @Valid AuthenticationData> authData)
This method authenticates using the designated org position or all org positions occupied by the agent if not provided.@NotNull @Valid ClientSessionDetails
authenticateCookie(@NotBlank String userName, Long orgPosId, @NotNull URI callerUri, String password)
This method authenticates with either the designated password or the OAuth2 authentication token retrieved from the request header using either the one and only org position the agent has or the designated org position.@NotNull @Valid ClientSessionDetails
authenticateMethodCookie(@NotBlank String method, @NotNull URI callerUri, @NotNull @Size(min=2) List<@NotNull @Valid AuthenticationData> authData)
Note that the token in the returnedClientSessionDetails
is Base64-URL-encoded (according to RFC 4648, table 2).void
logoff()
@NotEmpty List<@Valid QualifiedAgent>
preAuthenticate(@NotBlank String userName, String password)
This method pre-authenticates with either the designated password or the OAuth2 authentication token retrieved from the request header.@NotEmpty List<@Valid QualifiedAgent>
preAuthenticateMethod(@NotBlank String method, List<@NotNull @Valid AuthenticationData> authData)
-
Methods inherited from class de.aristaflow.ilm.ws.rest.base.service.AbstractSubResource
adaptHeaderData, getExceptionHandler, getLogger, getObjectMapper, getRequestHandler, getResponseHandler, getServiceResourceConfig, getWebService
-
-
-
-
Field Detail
-
SET_COOKIE_EXAMPLE
protected static final String SET_COOKIE_EXAMPLE
The example string for a setting a session token cookie.- See Also:
- Constant Field Values
-
UNSET_COOKIE_EXAMPLE
protected static final String UNSET_COOKIE_EXAMPLE
The example string for a unsetting a session token cookie.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GlobalSecurityManagerRest
public GlobalSecurityManagerRest(GlobalSecurityManagerWebService service, de.aristaflow.adept2.base.communication.rest.RequestHandler reqHandler, de.aristaflow.adept2.base.communication.rest.ResponseHandler respHandler, de.aristaflow.adept2.base.communication.rest.ExceptionHandler excpHandler, de.aristaflow.adept2.base.communication.rest.ServiceResourceConfig srConf, Supplier<com.fasterxml.jackson.databind.ObjectMapper> objectMapper, UnaryOperator<Exception> headerDataExcpAdapter)
-
-
Method Detail
-
preAuthenticate
@PUT @Path("/pre-authentication") @Consumes("application/x-www-form-urlencoded") @NotEmpty public @NotEmpty List<@Valid QualifiedAgent> preAuthenticate(@NotBlank @FormParam("userName") @NotBlank String userName, @FormParam("password") String password)
This method pre-authenticates with either the designated password or the OAuth2 authentication token retrieved from the request header.
-
preAuthenticateMethod
@PUT @Path("/pre-generic-authentication") @NotEmpty public @NotEmpty List<@Valid QualifiedAgent> preAuthenticateMethod(@NotBlank @QueryParam("method") @NotBlank String method, List<@NotNull @Valid AuthenticationData> authData)
-
authenticateCookie
@PUT @Path("/authentication-cookie") @Consumes("application/x-www-form-urlencoded") @NotNull @Valid public @NotNull @Valid ClientSessionDetails authenticateCookie(@NotBlank @FormParam("userName") @NotBlank String userName, @FormParam("orgPosId") Long orgPosId, @NotNull @FormParam("callerUri") @NotNull URI callerUri, @FormParam("password") String password)
This method authenticates with either the designated password or the OAuth2 authentication token retrieved from the request header using either the one and only org position the agent has or the designated org position. If no org position is provided and the agent occupies several org positions, anAuthenticationException
will be thrown.Note that the token in the returned
ClientSessionDetails
is Base64-URL-encoded (according to RFC 4648, table 2).
-
authenticateMethodCookie
@PUT @Path("/generic-authentication-cookie") @NotNull @Valid public @NotNull @Valid ClientSessionDetails authenticateMethodCookie(@NotBlank @QueryParam("method") @NotBlank String method, @NotNull @QueryParam("callerUri") @NotNull URI callerUri, @NotNull @Size(min=2) @NotNull @Size(min=2) List<@NotNull @Valid AuthenticationData> authData)
Note that the token in the returnedClientSessionDetails
is Base64-URL-encoded (according to RFC 4648, table 2).
-
authenticateAll
@PUT @Path("/authentication") @Consumes("application/x-www-form-urlencoded") @NotNull public @NotNull List<@Valid ClientSessionDetails> authenticateAll(@NotBlank @FormParam("userName") @NotBlank String userName, @FormParam("orgPosId") Long orgPosId, @NotNull @FormParam("callerUri") @NotNull URI callerUri, @FormParam("password") String password)
This method authenticates with either the designated password or the OAuth2 authentication token retrieved from the request header using the designated org position or all org positions occupied by the agent if not provided.Note that the token in the returned
ClientSessionDetails
is Base64-URL-encoded (according to RFC 4648, table 2).
-
authenticateAllMethod
@PUT @Path("/generic-authentication") @NotNull public @NotNull List<@Valid ClientSessionDetails> authenticateAllMethod(@NotBlank @QueryParam("method") @NotBlank String method, @NotNull @QueryParam("callerUri") @NotNull URI callerUri, List<@NotNull @Valid AuthenticationData> authData)
This method authenticates using the designated org position or all org positions occupied by the agent if not provided.Note that the token in the returned
ClientSessionDetails
is Base64-URL-encoded (according to RFC 4648, table 2).
-
logoff
@PUT @Path("/logoff") public void logoff()
-
-