Search in sources :

Example 6 with RptIntrospectionResponse

use of io.jans.as.model.uma.RptIntrospectionResponse in project jans by JanssenProject.

the class RptPreProcessInterceptor method requestRptStatus.

public RptIntrospectionResponse requestRptStatus(String rpt) {
    if (StringUtils.isNotBlank(rpt)) {
        LOG.debug("Request RPT " + rpt + " status...");
        final RptIntrospectionResponse status = serviceProvider.getRptIntrospectionService().requestRptStatus("Bearer " + patProvider.getPatToken(), rpt, "");
        if (status != null) {
            LOG.debug("RPT status: " + Jackson.asJsonSilently(status));
            return status;
        } else {
            LOG.debug("Unable to retrieve RPT " + rpt + " status from AM.");
        }
    }
    return null;
}
Also used : RptIntrospectionResponse(io.jans.as.model.uma.RptIntrospectionResponse)

Example 7 with RptIntrospectionResponse

use of io.jans.as.model.uma.RptIntrospectionResponse in project jans by JanssenProject.

the class AccessProtectedResourceFlowWSTest method _6_hostDeterminesRptStatus.

/*
     * **************************************************************** 6. Host
     * determines RPT status
     */
@Test(dependsOnMethods = { "_5_authorizePermission" })
@Parameters({ "umaRptStatusPath" })
public void _6_hostDeterminesRptStatus(String umaRptStatusPath) throws Exception {
    final RptIntrospectionResponse status = TUma.requestRptStatus(url, umaRptStatusPath, rpt.getRpt());
    UmaTestUtil.assertIt(status);
}
Also used : RptIntrospectionResponse(io.jans.as.model.uma.RptIntrospectionResponse) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test) BaseTest(io.jans.as.server.BaseTest)

Aggregations

RptIntrospectionResponse (io.jans.as.model.uma.RptIntrospectionResponse)7 Parameters (org.testng.annotations.Parameters)3 Test (org.testng.annotations.Test)3 BaseTest (io.jans.as.server.BaseTest)2 WebApplicationException (javax.ws.rs.WebApplicationException)2 BaseTest (io.jans.as.client.BaseTest)1 Holder (io.jans.as.model.common.Holder)1 RPTResponse (io.jans.as.model.uma.RPTResponse)1 UmaPermission (io.jans.as.model.uma.persistence.UmaPermission)1 ExternalUmaRptClaimsContext (io.jans.as.server.service.external.context.ExternalUmaRptClaimsContext)1 UmaPCT (io.jans.as.server.uma.authorization.UmaPCT)1 UmaRPT (io.jans.as.server.uma.authorization.UmaRPT)1 IOException (java.io.IOException)1 ClientErrorException (javax.ws.rs.ClientErrorException)1 Builder (javax.ws.rs.client.Invocation.Builder)1 Form (javax.ws.rs.core.Form)1 Response (javax.ws.rs.core.Response)1 ResteasyClientBuilder (org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder)1 ServerResponse (org.jboss.resteasy.core.ServerResponse)1 BuiltResponse (org.jboss.resteasy.specimpl.BuiltResponse)1