<FromGitter>
<rishavs> 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; ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/crystal-lang/crystal?at=60e29ffb368d0e1d9a41fcdb]
fifr[m] has quit [Quit: Reconnecting]
fifr[m] has joined #crystal-lang
ur5us_ has joined #crystal-lang
ur5us_ has quit [Ping timeout: 252 seconds]
adam12 has joined #crystal-lang
<FromGitter>
<asterite> I was also thinking that x.as?(T) could be rewritten as an if with is_a?... It's simpler for the compiler, no need to have extra logic
<FromGitter>
<jhass:m.aeshna.de> @rishavs: neither endpoint returns the expect PEM encoded key directly, the first returns a list of JWKs, the second returns a list of PEM encoded keys (certificates actually). the jwt's shard key argument expects the PEM encoded key directly, so you need to some parsing and extraction first. Second I don't know how you arrived at HS256 as algorithm, it's RSA keys so you'll want RS256, RS384 or RS512
<FromGitter>
... respectively, whichever one the JWT actually uses. Admittedly the shard could be more helpful here and extract the right algorithm from the JWT header
<kevinsjoberg>
But if I uncomment the last code, it does not compile.
<kevinsjoberg>
Oh, I'm dumb. Never mind, haha.
<kevinsjoberg>
This works, https://play.crystal-lang.org/#/r/bh8o. I realized self is something else entirely when calling it outside the MyShard namespace.
kevinsjoberg has quit []
kevinsjoberg has joined #crystal-lang
mike_onlooker has quit [Ping timeout: 246 seconds]
mike_onlooker has joined #crystal-lang
Flipez has quit [*.net *.split]
notzmv has quit [*.net *.split]
richbridger has quit [*.net *.split]
mps has quit [*.net *.split]
xybre has quit [*.net *.split]
avane has quit [*.net *.split]
mps has joined #crystal-lang
xybre has joined #crystal-lang
richbridger has joined #crystal-lang
avane has joined #crystal-lang
notzmv has joined #crystal-lang
Flipez has joined #crystal-lang
richbridger has quit [Max SendQ exceeded]
richbridger has joined #crystal-lang
postmodern has joined #crystal-lang
mike_onlooker has quit [Ping timeout: 246 seconds]
<FromGitter>
<lebogan> More with the raspberry pi compiling. So I'm clear: I need the current crystal version to compile the current crystal? I user the Portalier 0.33.0 and it compiled 0.33.0 but not 0.36.1. I got an error ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ The same happened when trying to compile 1.0.0. ... [https://gitter.im/crystal-lang/crystal?at=60e35d1865513b4d914c481f]
<FromGitter>
<Blacksmoke16> You'd need to use 0.36.0 to complile 0.36.1 most likely
<FromGitter>
<Blacksmoke16> I.e. the one right before the one you want
<FromGitter>
<lebogan> Yea, kinda thought so. Still trying to get 1.0.0 to compile for teaching purposes.