Middy
Middy

Reputation: 109

Validate Token using adal4j?

After recieving a token using acquireTokenByAuthorizationCode. How can I verify the token against the azure AD?

@Override
public void validateToken(String jwt) {

    //how to verify
}

Upvotes: 1

Views: 483

Answers (1)

dstrockis
dstrockis

Reputation: 1193

You're not supposed to. When you get a token from ADAL, you're supposed to send it to a web API that accepts that token. That web API does the validation.

If you want to get a token and validate it in your app to do sign-in, then we recommend you use OpenID Connect, which results in an id_token that you can validate.

Upvotes: 1

Related Questions