psecio / jwt

A JWT (JSON Web Token) Encoder & Decoder
110 stars 13 forks source link

Audience should be optional #16

Closed mediamonks-robert closed 9 years ago

mediamonks-robert commented 9 years ago

Currently the "audience" field is mandatory:

if (!isset($claims->aud) || empty($claims->aud)) {
    throw new Exception\DecodeException('Audience not defined [aud]');
}

According to the spec this should be optional: https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3

enygma commented 9 years ago

This has been changed and is updated in release 1.7. Thanks!

mediamonks-robert commented 9 years ago

Great, thanks :)