Class SsaRestWebServiceImpl

java.lang.Object
io.jans.as.server.ssa.ws.rs.SsaRestWebServiceImpl
All Implemented Interfaces:
SsaRestWebService

@Path("/") public class SsaRestWebServiceImpl extends Object implements SsaRestWebService
Implements all methods of the SsaRestWebService interface.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.ws.rs.core.Response
    create(String requestParams, jakarta.servlet.http.HttpServletRequest httpRequest)
    Creates an SSA from the requested parameters.
    jakarta.ws.rs.core.Response
    get(String jti, String orgId, jakarta.servlet.http.HttpServletRequest httpRequest)
    Get existing active SSA based on "jti" or "org_id".
    jakarta.ws.rs.core.Response
    Get JWT from existing active SSA based on "jti".
    jakarta.ws.rs.core.Response
    revoke(String jti, String orgId, jakarta.servlet.http.HttpServletRequest httpRequest)
    Revoked existing active SSA based on "jti" or "org_id".
    jakarta.ws.rs.core.Response
    Validate existing active SSA based on "jti".

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SsaRestWebServiceImpl

      public SsaRestWebServiceImpl()
  • Method Details

    • create

      public jakarta.ws.rs.core.Response create(String requestParams, jakarta.servlet.http.HttpServletRequest httpRequest)
      Creates an SSA from the requested parameters.

      Method calls the action where the SSA creation logic is implemented.

      Specified by:
      create in interface SsaRestWebService
      Parameters:
      requestParams - Valid json
      httpRequest - Http request object
      Returns:
      Response with status 201 (Created) and with body the ssa token (jwt).
    • get

      public jakarta.ws.rs.core.Response get(String jti, String orgId, jakarta.servlet.http.HttpServletRequest httpRequest)
      Get existing active SSA based on "jti" or "org_id".

      Method calls the action where the SSA get logic is implemented.

      Specified by:
      get in interface SsaRestWebService
      Parameters:
      jti - Unique identifier
      orgId - Organization ID
      httpRequest - Http request
      Returns:
      Response with status 200 (Ok) and with body List of SSA.
    • validate

      public jakarta.ws.rs.core.Response validate(String jti)
      Validate existing active SSA based on "jti".

      Method calls the action where the SSA validate logic is implemented.

      Specified by:
      validate in interface SsaRestWebService
      Parameters:
      jti - Unique identifier
      Returns:
      Response with status 200 (Ok) if SSA has been validated.
    • revoke

      public jakarta.ws.rs.core.Response revoke(String jti, String orgId, jakarta.servlet.http.HttpServletRequest httpRequest)
      Revoked existing active SSA based on "jti" or "org_id".

      Method calls the action where the SSA revoke logic is implemented.

      Specified by:
      revoke in interface SsaRestWebService
      Parameters:
      jti - Unique identifier
      orgId - Organization ID
      httpRequest - Http request
      Returns:
      Response with status 200 (Ok) if SSA has been revoked.
    • getSsaJwtByJti

      public jakarta.ws.rs.core.Response getSsaJwtByJti(String jti)
      Get JWT from existing active SSA based on "jti".

      Method will return the following exceptions: - WebApplicationException with status 401 if this functionality is not enabled, request has to have at least scope "ssa.admin". - WebApplicationException with status 400 (Bad Request) with <b>invalid_jti<b/> key, when jti does not exist, is invalid or state is in (expired, used or revoked). - WebApplicationException with status 500 in case an uncontrolled error occurs when processing the method.

      Specified by:
      getSsaJwtByJti in interface SsaRestWebService
      Parameters:
      jti - Unique identifier
      Returns:
      Response with status 200 (Ok) and the body containing JWT of SSA.