Package io.goobi.viewer.api.rest.v2.auth
Class AuthorizationFlowResource
java.lang.Object
io.goobi.viewer.api.rest.v2.auth.AuthorizationFlowResource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
accessTokenService
(String messageId, String origin) Token service.de.intranda.api.iiif.auth.v2.AuthProbeService2
For testing purposes.jakarta.ws.rs.core.Response
handleProbePreflight
(String pi, int order, String origin) jakarta.ws.rs.core.Response
handleProbePreflight
(String pi, String origin) Probe pre-flight endpoint (METS resolver).jakarta.ws.rs.core.Response
handleProbePreflight
(String pi, String filename, String origin) jakarta.ws.rs.core.Response
loginService
(String origin) Access (login) service.jakarta.ws.rs.core.Response
logout()
jakarta.ws.rs.core.Response
probeResource
(String pi, int order, String origin) Probe service endpoint (page PDF).jakarta.ws.rs.core.Response
probeResource
(String pi, String origin) Probe service endpoint (METS resolver).jakarta.ws.rs.core.Response
probeResource
(String pi, String filename, String origin) Probe service endpoint (image and text).
-
Constructor Details
-
AuthorizationFlowResource
public AuthorizationFlowResource(@Context jakarta.servlet.http.HttpServletRequest request)
-
-
Method Details
-
getServiceDescription
@GET @Produces("application/json") public de.intranda.api.iiif.auth.v2.AuthProbeService2 getServiceDescription()For testing purposes.- Returns:
AuthProbeService2
-
loginService
@GET @Path("/login") @Produces("text/html") public jakarta.ws.rs.core.Response loginService(@QueryParam("origin") String origin) Access (login) service.- Parameters:
origin
- Mandatory origin parameter from the client- Returns:
Response
-
accessTokenService
@GET @Path("/token") @Produces("text/html") public jakarta.ws.rs.core.Response accessTokenService(@QueryParam("messageId") String messageId, @QueryParam("origin") String origin) throws com.fasterxml.jackson.core.JsonProcessingException Token service. Issues a bearer token, if conditions are met.- Parameters:
messageId
- Client-generated message ID; Must be included in the responseorigin
- Mandatory origin parameter from the client- Returns:
Response
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
handleProbePreflight
@OPTIONS @Path("/probe/{pi}/{filename}") @Produces("application/json") public jakarta.ws.rs.core.Response handleProbePreflight(@PathParam("pi") String pi, @PathParam("filename") String filename, @HeaderParam("Origin") String origin) - Parameters:
pi
- Record identifierfilename
- Content file nameorigin
- Client origin- Returns:
Response
-
probeResource
@GET @Path("/probe/{pi}/{filename}") @Produces("application/json") public jakarta.ws.rs.core.Response probeResource(@PathParam("pi") String pi, @PathParam("filename") String filename, @HeaderParam("Origin") String origin) throws com.fasterxml.jackson.core.JsonProcessingException Probe service endpoint (image and text). The session will probably be different here from previous login/token queries.- Parameters:
pi
-filename
-origin
-- Returns:
Response
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
handleProbePreflight
@OPTIONS @Path("/probe/pdf/{pi}/{page}") @Produces("application/json") public jakarta.ws.rs.core.Response handleProbePreflight(@PathParam("pi") String pi, @PathParam("order") int order, @HeaderParam("Origin") String origin) - Parameters:
pi
- Record identifierorder
- Page numberorigin
- Client origin- Returns:
Response
-
probeResource
@GET @Path("/probe/pdf/{pi}/{page}") @Produces("application/json") public jakarta.ws.rs.core.Response probeResource(@PathParam("pi") String pi, @PathParam("order") int order, @HeaderParam("Origin") String origin) throws com.fasterxml.jackson.core.JsonProcessingException Probe service endpoint (page PDF). The session will probably be different here from previous login/token queries.- Parameters:
pi
- Record identifierorder
- Page numberorigin
-- Returns:
Response
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
handleProbePreflight
@OPTIONS @Path("/probe/resolver/{pi}") @Produces("application/json") public jakarta.ws.rs.core.Response handleProbePreflight(@PathParam("pi") String pi, @HeaderParam("Origin") String origin) Probe pre-flight endpoint (METS resolver).- Parameters:
pi
- Record identifierorigin
- Client origin- Returns:
Response
-
probeResource
@GET @Path("/probe/resolver/{pi}") @Produces("application/json") public jakarta.ws.rs.core.Response probeResource(@PathParam("pi") String pi, @HeaderParam("Origin") String origin) throws com.fasterxml.jackson.core.JsonProcessingException Probe service endpoint (METS resolver). The session will probably be different here from previous login/token queries.- Parameters:
pi
- Record identifierorigin
- Client origin- Returns:
Response
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
logout
@GET @Path("/logout") @Produces("application/json") public jakarta.ws.rs.core.Response logout() -
generateCookie
- Returns:
- Cookie as string
-