@Path(value="/authorize") public final class AuthorizationService extends Object
| Constructor and Description |
|---|
AuthorizationService(org.hibernate.Session session,
javax.ws.rs.core.SecurityContext securityContext,
org.glassfish.jersey.internal.inject.InjectionManager injector)
Create a new authorization service.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
authorizationCallback(javax.ws.rs.core.UriInfo uriInfo,
javax.servlet.http.HttpServletRequest request,
String state)
Handle a callback from an authentication provider.
|
javax.ws.rs.core.Response |
authorizationRequest(javax.ws.rs.core.UriInfo uriInfo,
javax.servlet.http.HttpServletRequest request,
AuthenticatorType authenticator,
String responseType,
String redirectUrl,
String scope,
String state)
Attempt to execute an authorization request based on the provided
request parameters.
|
@Inject
public AuthorizationService(org.hibernate.Session session,
javax.ws.rs.core.SecurityContext securityContext,
org.glassfish.jersey.internal.inject.InjectionManager injector)
session - Injected hibernate session.securityContext - The security context for the current request.injector - Injected injection manager@GET
@Produces(value="application/json")
public javax.ws.rs.core.Response authorizationRequest(@Context
javax.ws.rs.core.UriInfo uriInfo,
@Context
javax.servlet.http.HttpServletRequest request,
@Optional @QueryParam(value="authenticator")
AuthenticatorType authenticator,
@Optional @QueryParam(value="response_type")
String responseType,
@Optional @QueryParam(value="redirect_uri")
String redirectUrl,
@Optional @QueryParam(value="scope")
String scope,
@Optional @QueryParam(value="state")
String state)
uriInfo - The requested URI.request - The servlet request.authenticator - A string key for the authenticator that should be
used.responseType - The requested response_type.state - An XSS Busting state string.scope - A requested authorization scope.redirectUrl - The requested redirect uri.@GET
@Path(value="/callback")
@Produces(value="application/json")
public javax.ws.rs.core.Response authorizationCallback(@Context
javax.ws.rs.core.UriInfo uriInfo,
@Context
javax.servlet.http.HttpServletRequest request,
@Optional @DefaultValue(value="") @QueryParam(value="state")
String state)
state - State passed to the authenticator to include in the
callback.request - The servlet request.uriInfo - The URI, including all result parameters.Copyright © 2018 krotscheck.net. All rights reserved.