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 Summary
Constructors Constructor Description RolesAllowedTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
callEcho()
void
callEcho2()
void
callEchoBASIC()
void
callEchoNoAuth()
void
callEchoNoGroups()
void
callEchoSignEncryptToken()
void
callEchoSignToken()
void
callHeartbeat()
void
checkIsUserInRole()
void
checkIsUserInRoleToken2()
static org.jboss.shrinkwrap.api.spec.WebArchive
createDeployment()
Create a CDI aware base web application archivevoid
echoNeedsToken2Role()
void
echoWithToken2()
static void
generateToken()
void
getInjectedPrincipal()
void
getPrincipalClass()
void
noTokenHeaderSetToCookie()
void
testNeedsGroup1Mapping()
This test requires that the server provide a mapping from the group1 grant in the token to a Group1MappedRole application declared role.
-
-
-
Method Detail
-
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
-
callEchoSignEncryptToken
@RunAsClient public void callEchoSignEncryptToken() throws Exception
- Throws:
Exception
-
checkIsUserInRoleToken2
@RunAsClient public void checkIsUserInRoleToken2() throws Exception
- Throws:
Exception
-
echoNeedsToken2Role
@RunAsClient public void echoNeedsToken2Role() 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
-
-