Closed jeffreylo closed 2 years ago
this sounds like a backwards compatible plan that would return a superset of the current claims, right?
Correct. As I understand it, identities.Claims
embeds the original jwt.Claims
, augmenting with AuthTime
: https://github.com/keratin/authn-server/blob/b2b9bdaea5b19c143aca8df02aef61e7e183d7af/app/tokens/identities/identity.go#L16-L19
https://github.com/keratin/authn-go/pull/18 still doesn’t completely address extraction of the custom
auth_time
claim of authn-server’s Identity Token as it only returns the standard verified claims defined bygo-jose
.This may require a change to
ClaimsFrom
,ClaimsFromWithAudience
,IDTokenVerifier
, and theJWTClaimsExtractor
interface to return theClaims
from theidentities
package inauthn-server
: https://github.com/keratin/authn-server/blob/main/app/tokens/identities/identity.go#L16-L19. Assuming https://github.com/keratin/authn-go/blob/master/authn/authn.go#L11 is still a desired outcome, this might be an opportunity to factor outjwt.Claims
and replace withidentities.Claims
.e.g., the patch could look something like this: