Search in sources :

Example 11 with RptIntrospectionResponse

use of org.xdi.oxauth.model.uma.RptIntrospectionResponse in project oxAuth by GluuFederation.

the class AccessProtectedResourceFlowWSTest method _6_hostDeterminesRptStatus.

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

Example 12 with RptIntrospectionResponse

use of org.xdi.oxauth.model.uma.RptIntrospectionResponse in project oxAuth by GluuFederation.

the class AccessProtectedResourceFlowWSTest method _3_hostDeterminesRptStatus.

/*
	 * **************************************************************** 3. Host
	 * determines RPT status
	 */
@Test(dependsOnMethods = { "_2_requesterAccessProtectedResourceWithNotEnoughPermissionsRpt" })
@Parameters({ "umaRptStatusPath", "umaAmHost" })
public void _3_hostDeterminesRptStatus(String umaRptStatusPath, String umaAmHost) throws Exception {
    final RptIntrospectionResponse status = TUma.requestRptStatus(url, umaRptStatusPath, umaAmHost, pat, rpt.getRpt());
    Assert.assertTrue(status.getActive(), "Token response status is not active");
    Assert.assertTrue(status.getPermissions() == null || status.getPermissions().isEmpty(), "Permissions list is not empty.");
}
Also used : RptIntrospectionResponse(org.xdi.oxauth.model.uma.RptIntrospectionResponse) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test) BaseTest(org.xdi.oxauth.BaseTest)

Aggregations

RptIntrospectionResponse (org.xdi.oxauth.model.uma.RptIntrospectionResponse)12 Test (org.testng.annotations.Test)7 BaseTest (org.xdi.oxauth.BaseTest)7 ClientResponseFailure (org.jboss.resteasy.client.ClientResponseFailure)5 Parameters (org.testng.annotations.Parameters)5 UmaPermission (org.xdi.oxauth.model.uma.UmaPermission)4 Response (javax.ws.rs.core.Response)2 HttpResponse (org.apache.http.HttpResponse)2 Pair (org.xdi.util.Pair)2 ApiOperation (com.wordnik.swagger.annotations.ApiOperation)1 ApiResponses (com.wordnik.swagger.annotations.ApiResponses)1 IOException (java.io.IOException)1 MalformedURLException (java.net.MalformedURLException)1 Date (java.util.Date)1 LinkedList (java.util.LinkedList)1 POST (javax.ws.rs.POST)1 Produces (javax.ws.rs.Produces)1 WebApplicationException (javax.ws.rs.WebApplicationException)1 UmaRPT (org.xdi.oxauth.model.common.uma.UmaRPT)1 RptAuthorizationRequest (org.xdi.oxauth.model.uma.RptAuthorizationRequest)1