Skip to content

Commit

Permalink
Drop the redundant MP-JWT parsing tests that rely on ITokenParser
Browse files Browse the repository at this point in the history
Drop the TCK harness section regarding an ITokenParser implementation
  • Loading branch information
starksm64 committed Apr 12, 2018
1 parent a4ac383 commit 5a1b881
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions tck/README.adoc
Expand Up @@ -88,12 +88,6 @@ https://github.com/MicroProfileJWT/wfswarm-jwt-auth-tck-viabase
while an example of the latter is:
https://github.com/MicroProfileJWT/wfswarm-jwt-auth-tck

Additionally, you must provide an implementation of the `org.eclipse.microprofile.jwt.tck.util.ITokenParser`
interface using the `java.util.ServiceLoader` pattern. This is used by the TCK tests that validate the
basic behavior of the MP-JWT JsonWebToken implementation independent of any container runtime deployment. An
example of an `ITokenParser` implementation can be found in:
https://github.com/MicroProfileJWT/wfswarm-jwt-auth-tck/tree/master/src/main/java/org/eclipse/microprofile/jwt/wfswarm/tck[TCKTokenParser.java].


== Creating Your Implementation TCK Harness Artifact
As described, you need to create an artifact that bundles a LoadableExtension
Expand Down Expand Up @@ -195,8 +189,7 @@ An example skeleton pom.xml is shown here:
</project>
----
<1> org.eclipse.microprofile.jwt:microprofile-jwt-auth-tck is the MP-JWT artifact
that contains the base `LoadableExtension` and `ApplicationArchiveProcessor` classes,
as well as the `ITokenParser` harness factory interface and `TokenUtils` class.
that contains the base `LoadableExtension` and `ApplicationArchiveProcessor` classes and `TokenUtils` class.
<2> org.eclipse.microprofile.jwt:microprofile-jwt-auth-tck type=test-jar is the MP-JWT
TCK tests themselves you need to run for the TCK. You would only need this if you are
running the TCK from within your TCK harness project.
Expand Down Expand Up @@ -288,27 +281,6 @@ UnsecuredPingTest::
Once you have built and installed your TCK harness artifact, you can run the
TCK tests against it by using either the `tokens-se` or `container` profiles.

=== tokens-se Profile
The tokens-se profile is a basic unit test for validation of your JWTPrincipal implementation. This does not require
any special test container runner. This test does require that your TCK harness artifact provide an implementation of
the `org.eclipse.microprofile.jwt.tck.util.ITokenParser` interface using a service provider via the
`java.util.ServiceLoader` pattern, that is, there should be a META-INF/services/org.eclipse.microprofile.jwt.tck.util.ITokenParser
file in your TCK harness artifact that points to your ITokenParser implementation.

To run the unit tests associated with the tokens-se profile, run the following command
from within the microprofile-jwt-auth/tck directory:

`mvn -Ptokens-se -Dtck.container.groupId={MY_GROUP} -Dtck.container.artifactId={MY_ARTIFACT} -Dtck.container.version={MY_VERSION} test`

where you would replace the `{MY_GROUP}`, `{MY_ARTIFACT}` and `{MY_VERSION}` with
the `<groupId>...<groupId>`, `<artifactId>...</artifactId>`, and `<version>...</version>`
respectively from your TCK harness artifact.

A concrete example is for running with the TCK harness artifiact from the
https://github.com/MicroProfileJWT/wfswarm-jwt-auth-tck project is:

`mvn -Ptokens-se -Dtck.container.groupId=org.wildfly.swarm -Dtck.container.artifactId=jwt-auth-tck -Dtck.container.version=1.0-SNAPSHOT test`

=== container Profile
The container profile is a test of JAX-RS client tests that validate a JAX-RS endpoint bundled in a WebArchive deployment
via your implementation. These tests require Arquillian container runtime integration to properly deploy and start
Expand Down Expand Up @@ -422,9 +394,7 @@ your build root:
</run>
</groups>
<classes>
<class name="org.eclipse.microprofile.jwt.tck.parsing.TokenValidationTest" />
<class name="org.eclipse.microprofile.jwt.tck.util.TokenUtilsTest" />
<class name="org.eclipse.microprofile.jwt.tck.parsing.TestTokenClaimTypesTest" />
<class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.UnsecuredPingTest" />
<class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.RequiredClaimsTest" />
<class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.ClaimValueInjectionTest" />
Expand Down

0 comments on commit 5a1b881

Please sign in to comment.