The Crystal programming language | http://crystal-lang.org | Fund Crystal's development: http://is.gd/X7PRtI | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/
T?
and the latter returns a (typeof(x) & T)?
)
x.as?(T)
versus x.as(T) if x.is_a?(T)
require "logger"
log = Logger.new(STDOUT)
log.level = Logger::WARN
log.debug("Created logger")
log.info("Program started")
log.warn("Nothing to do!")
getting
require "logger"
^
Error: can't find file 'logger'
I am trying to verify google/AWS jwts using their public keys but not succeeding. Would anyone know how to do so?
For eg.
the google sign ins key is at;
pp! pub_key_jwk = HTTP::Client.get "https://www.googleapis.com/oauth2/v3/certs"
pp! pub_key_pem = HTTP::Client.get "https://www.googleapis.com/oauth2/v1/certs"
and I would want to decode like this;payload, header = JWT.decode(token, pub_key_pem , JWT::Algorithm::HS256)
But I couldn't find a way to do this using https://github.com/crystal-community/jwt#usage