Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class JwtAudienceValidator
- Object
- JwtAudienceValidator
ImplementsOAuth2TokenValidator<Jwt>
Refuses a token that is not for this server: one whose aud names none of
the audiences given here. A token with no audience at all is refused.
Without this a token an identity provider issued for some other application is as good here as one issued for this one.
Constructors
public JwtAudienceValidator(String... audiences) |
Methods
public OAuth2TokenValidatorResult validate(Jwt jwt) | Whether token passes, and why not. |
Inherited methods
Constructor details
JwtAudienceValidator
public JwtAudienceValidator(String... audiences)Parameters
audiencesString...- what this server is called in a token’s
aud; any one of them will do
Method details
validate
public OAuth2TokenValidatorResult validate(Jwt jwt)Whether
token passes, and why not.