keratin / authn-go

Go client library for Keratin AuthN
https://github.com/keratin/authn-server
GNU Lesser General Public License v3.0
32 stars 10 forks source link

Getting the expiry time from the token? #17

Closed jeffreylo closed 3 years ago

jeffreylo commented 3 years ago

https://keratin.github.io/authn-server/#/guide-confirm-password indicates that authn client libraries are able to extract the expiry/auth_time from the access token to prompt the user for a password. It seems that this capability is missing, but I've likely overlooked something.

cainlevy commented 3 years ago

You're right! It looks like the authn-go client doesn't currently have a function to access all verified claims. It should be a simple matter of delegating to verifier.GetVerifiedClaims, as this function does:

https://github.com/keratin/authn-go/blob/45602e8424095484881debf5e40e2ded222e0206/authn/authn.go#L68-L74

I may not get to this right away. Are you interested in submitting a PR?

jeffreylo commented 3 years ago

Are you interested in submitting a PR?

I am! I already sketched out an approach, but wanted to make sure I wasn’t missing anything before starting. Thanks, @cainlevy.