Class RolesAllowedTest

java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.jwt.tck.container.jaxrs.RolesAllowedTest
All Implemented Interfaces:
org.testng.IHookable, org.testng.ITestNGListener

public class RolesAllowedTest extends org.jboss.arquillian.testng.Arquillian
Tests of the MP-JWT auth method authorization behavior as expected by the MP-JWT RBAC 1.0 spec
  • Constructor Details

    • RolesAllowedTest

      public RolesAllowedTest()
  • Method Details

    • createDeployment

      @Deployment(testable=true) public static org.jboss.shrinkwrap.api.spec.WebArchive createDeployment() throws IOException
      Create a CDI aware base web application archive
      Returns:
      the base base web application archive
      Throws:
      IOException - - on resource failure
    • generateToken

      @BeforeClass(alwaysRun=true) public static void generateToken() throws Exception
      Throws:
      Exception
    • callEchoNoAuth

      @RunAsClient public void callEchoNoAuth() throws Exception
      Throws:
      Exception
    • callEchoBASIC

      @RunAsClient public void callEchoBASIC() throws Exception
      Throws:
      Exception
    • callEcho

      @RunAsClient public void callEcho() throws Exception
      Throws:
      Exception
    • callEchoSignToken

      @RunAsClient public void callEchoSignToken() throws Exception
      Throws:
      Exception
    • callEchoSignEncryptToken

      @RunAsClient public void callEchoSignEncryptToken() throws Exception
      Throws:
      Exception
    • callEchoNoGroups

      @RunAsClient public void callEchoNoGroups() throws Exception
      Throws:
      Exception
    • callEcho2

      @RunAsClient public void callEcho2() throws Exception
      Throws:
      Exception
    • checkIsUserInRole

      @RunAsClient public void checkIsUserInRole() throws Exception
      Throws:
      Exception
    • checkIsUserInRoleToken2

      @RunAsClient public void checkIsUserInRoleToken2() throws Exception
      Throws:
      Exception
    • echoNeedsToken2Role

      @RunAsClient public void echoNeedsToken2Role() throws Exception
      Throws:
      Exception
    • echoWithToken2

      @RunAsClient public void echoWithToken2() throws Exception
      Throws:
      Exception
    • getPrincipalClass

      @RunAsClient public void getPrincipalClass() throws Exception
      Throws:
      Exception
    • testNeedsGroup1Mapping

      @RunAsClient public void testNeedsGroup1Mapping()
      This test requires that the server provide a mapping from the group1 grant in the token to a Group1MappedRole application declared role.
    • getInjectedPrincipal

      @RunAsClient public void getInjectedPrincipal() throws Exception
      Throws:
      Exception
    • callHeartbeat

      @RunAsClient public void callHeartbeat() throws Exception
      Throws:
      Exception
    • noTokenHeaderSetToCookie

      @RunAsClient public void noTokenHeaderSetToCookie() throws Exception
      Throws:
      Exception