Package io.jans.as.server.ssa.ws.rs
Interface SsaRestWebService
-
- All Known Implementing Classes:
SsaRestWebServiceImpl
public interface SsaRestWebService
Interface to handle all SSA REST web services.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description jakarta.ws.rs.core.Response
create(String requestParams, jakarta.servlet.http.HttpServletRequest httpRequest)
Create SSA for the organization with "expiration" (optional).jakarta.ws.rs.core.Response
get(String jti, String orgId, jakarta.servlet.http.HttpServletRequest httpRequest)
Get list of SSA based on "jti" or "org_id" filter.jakarta.ws.rs.core.Response
getSsaJwtByJti(String jti)
Get JWT from existing active SSA based on "jti".jakarta.ws.rs.core.Response
revoke(String jti, String orgId, jakarta.servlet.http.HttpServletRequest httpRequest)
Revokes existing active SSA based on "jti" or "org_id".jakarta.ws.rs.core.Response
validate(String jti)
Validate existing active SSA based on "jti".
-
-
-
Method Detail
-
create
@POST @Path("/ssa") @Produces("application/json") jakarta.ws.rs.core.Response create(String requestParams, @Context jakarta.servlet.http.HttpServletRequest httpRequest)
Create SSA for the organization with "expiration" (optional).- Parameters:
requestParams
- Valid jsonhttpRequest
- Http request object- Returns:
Response
with status201 (Created)
and with body the ssa token, or with status401 (Unauthorized)
if unauthorized access request, or with status500 (Internal Server Error)
if internal error occurred.
-
get
@GET @Path("/ssa") @Produces("application/json") jakarta.ws.rs.core.Response get(@QueryParam("jti") String jti, @QueryParam("org_id") String orgId, @Context jakarta.servlet.http.HttpServletRequest httpRequest)
Get list of SSA based on "jti" or "org_id" filter.- Parameters:
jti
- Unique identifierorgId
- Organization IDhttpRequest
- Http request- Returns:
- the
Response
with status200 (Ok)
and with body the ssa list, or with status401 (Unauthorized)
if unauthorized access request, or with status500 (Internal Server Error)
if internal error occurred.
-
validate
@POST @Path("/ssa/validation") @Produces("application/json") jakarta.ws.rs.core.Response validate(@HeaderParam("jti") String jti)
Validate existing active SSA based on "jti".- Parameters:
jti
- Unique identifier- Returns:
Response
with status200 (Ok)
if is was validated successfully, or with status401 (Unauthorized)
if unauthorized access request, or with status400 (Bad Request) with <b>invalid_jti<b/> key
, when jti does not exist, is invalid or state is in (expired, used or revoked), or with status500 (Internal Server Error)
if internal error occurred.
-
revoke
@DELETE @Path("/ssa") @Produces("application/json") jakarta.ws.rs.core.Response revoke(@QueryParam("jti") String jti, @QueryParam("org_id") String orgId, @Context jakarta.servlet.http.HttpServletRequest httpRequest)
Revokes existing active SSA based on "jti" or "org_id".- Parameters:
jti
- Unique identifierorgId
- Organization IDhttpRequest
- Http request- Returns:
- the
Response
with status200 (Ok)
if it was revoked successfully, or with status401 (Unauthorized)
if unauthorized access request, or with status500 (Internal Server Error)
if internal error occurred.
-
getSsaJwtByJti
@GET @Path("/ssa/jwt") @Produces("application/json") jakarta.ws.rs.core.Response getSsaJwtByJti(@QueryParam("jti") String jti)
Get JWT from existing active SSA based on "jti".- Parameters:
jti
- Unique identifier- Returns:
Response
with status200 (Ok)
and the body containing JWT of SSA. or with status401
if this functionality is not enabled, request has to have at least scope "ssa.admin", or with status403
if the SSA does not exist, is expired or used, or with status500
in case an uncontrolled error occurs when processing the method.
-
-