Skip to content

Wrap decode/verify logic inside a JWT class#88

Merged
lbalmaceda merged 4 commits into
v3from
better-builders
Nov 2, 2016
Merged

Wrap decode/verify logic inside a JWT class#88
lbalmaceda merged 4 commits into
v3from
better-builders

Conversation

@lbalmaceda

@lbalmaceda lbalmaceda commented Oct 31, 2016

Copy link
Copy Markdown
Contributor

Usage

Decode

JWT jwt = JWT.decode("my.jwt.token");

Verify

None Algorithm

JWT jwt = JWT.require(Algorithm.none())
                .build()
                .verify("my.jwt.token");

HMAC Algorithm

JWT jwt = JWT.requireHS(Algorithm.HMAC256("secret"))
                .build()
                .verify("my.jwt.token");

RSA Algorithm

JWT jwt = JWT.requireRS(Algorithm.RSA256(publicKey))
                .build()
                .verify("my.jwt.token");

@lbalmaceda lbalmaceda force-pushed the better-builders branch 4 times, most recently from b3fc8d7 to 0390980 Compare November 1, 2016 20:38
@lbalmaceda lbalmaceda merged commit 0071cdf into v3 Nov 2, 2016
@lbalmaceda lbalmaceda deleted the better-builders branch November 2, 2016 15:00
@auth0 auth0 locked and limited conversation to collaborators Nov 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant