Search in sources :

Example 6 with RptAuthorizationResponse

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

the class TrustElevationWSTest method authorizePermission.

@Test(dependsOnMethods = { "registerPermissionForRpt" })
@Parameters({ "umaPermissionAuthorizationPath", "umaAmHost" })
public void authorizePermission(String umaPermissionAuthorizationPath, String umaAmHost) {
    final RptAuthorizationRequest request = new RptAuthorizationRequest();
    request.setRpt(rpt.getRpt());
    request.setTicket(ticket.getTicket());
    request.setClaims(new ClaimTokenList().addToken(new ClaimToken("clientClaim", "clientValue")));
    final RptAuthorizationResponse response = TUma.requestAuthorization(url, umaPermissionAuthorizationPath, umaAmHost, aat, request);
    assertNotNull(response, "Token response status is null");
// final RptIntrospectionResponse status = TUma.requestRptStatus(this,
// umaRptStatusPath, umaAmHost, m_pat, m_rpt.getRpt());
// UmaTestUtil.assert_(status);
}
Also used : RptAuthorizationResponse(org.xdi.oxauth.model.uma.RptAuthorizationResponse) RptAuthorizationRequest(org.xdi.oxauth.model.uma.RptAuthorizationRequest) ClaimToken(org.xdi.oxauth.model.uma.ClaimToken) ClaimTokenList(org.xdi.oxauth.model.uma.ClaimTokenList) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test) BaseTest(org.xdi.oxauth.BaseTest)

Aggregations

RptAuthorizationResponse (org.xdi.oxauth.model.uma.RptAuthorizationResponse)6 Parameters (org.testng.annotations.Parameters)5 Test (org.testng.annotations.Test)5 BaseTest (org.xdi.oxauth.BaseTest)5 RptAuthorizationRequest (org.xdi.oxauth.model.uma.RptAuthorizationRequest)5 ClientResponseFailure (org.jboss.resteasy.client.ClientResponseFailure)3 ClaimToken (org.xdi.oxauth.model.uma.ClaimToken)2 ClaimTokenList (org.xdi.oxauth.model.uma.ClaimTokenList)2 Consumes (javax.ws.rs.Consumes)1 POST (javax.ws.rs.POST)1 Produces (javax.ws.rs.Produces)1 WebApplicationException (javax.ws.rs.WebApplicationException)1 AuthorizationGrant (org.xdi.oxauth.model.common.AuthorizationGrant)1 UmaRPT (org.xdi.oxauth.model.common.uma.UmaRPT)1 RptIntrospectionResponse (org.xdi.oxauth.model.uma.RptIntrospectionResponse)1