ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
ur5us_ has quit [Ping timeout: 256 seconds]
ur5us_ has joined #crystal-lang
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
notzmv has quit [Ping timeout: 265 seconds]
<FromGitter> <perfecto25> hello, Im on crystal 1.0.0, running basic logger output,
<FromGitter> <perfecto25> `require "logger" ⏎ ⏎ log = Logger.new(STDOUT) ⏎ log.level = Logger::WARN ⏎ ... [https://gitter.im/crystal-lang/crystal?at=60e285666c992105fdb6d7ec]
<FromGitter> <perfecto25> getting ⏎ ⏎ require "logger" ⏎ ⏎ ``` ^``` ... [https://gitter.im/crystal-lang/crystal?at=60e28573110daa37b12090d5]
<FromGitter> <perfecto25> running on linux mint 20.1
<FromGitter> <Blacksmoke16> It's require log
<FromGitter> <Blacksmoke16> Logger was the old version
<FromGitter> <perfecto25> thx, was looking at old docs
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/Log.html is the one you want to use now. One you're using atm is the legacy one
<FromGitter> <Blacksmoke16> 👍
notzmv has joined #crystal-lang
jhass has quit [*.net *.split]
dannyAAM has quit [*.net *.split]
jrayhawk has quit [*.net *.split]
wmoxam has quit [*.net *.split]
wmoxam has joined #crystal-lang
jrayhawk_ has joined #crystal-lang
markmarkmark has quit [*.net *.split]
ulyssa has quit [*.net *.split]
krobin has quit [*.net *.split]
krobin has joined #crystal-lang
dom96 has quit [*.net *.split]
Flipez has quit [*.net *.split]
riza has quit [*.net *.split]
adam12 has quit [*.net *.split]
oz has quit [*.net *.split]
Flipez has joined #crystal-lang
ox has joined #crystal-lang
dannyAAM has joined #crystal-lang
jhass has joined #crystal-lang
ulyssa has joined #crystal-lang
dom96 has joined #crystal-lang
riza has joined #crystal-lang
markmarkmark has joined #crystal-lang
ur5us_ has quit [Ping timeout: 240 seconds]
<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
<FromGitter> <rishavs> @jhass:m.aeshna.de , I did try to extract the keys and then use it in JWT decode, but that didn't work; ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=60e30d29f862a72a30ee0688]
<jhass[m]> Well yes, a JWK's kid field is not a PEM encoded public key. https://datatracker.ietf.org/doc/html/rfc7517#section-4.5
<FromGitter> <rishavs> Is this bit of string ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ what I need in my `JWT.decode(id_token, key_pem, JWT::Algorithm::RS256)`? [https://gitter.im/crystal-lang/crystal?at=60e30e87b60c3137c3ac44cd]
<jhass[m]> I guess, try it!
<FromGitter> <rishavs> getting a slightly different error now; ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=60e313e0effd491d8ca04f5e]
ox is now known as oz
deavmi_ has joined #crystal-lang
deavmi has quit [Ping timeout: 256 seconds]
<kevinsjoberg> If I define a macro in a shard, and then call this macro from a project using this shard, shouldn't that work?
<kevinsjoberg> I would expect the macro (it creates a method based on input) to be present, but it doesn't seem to be the case.
mike_onlooker has joined #crystal-lang
<kevinsjoberg> Basically, I expected the following to work. https://play.crystal-lang.org/#/r/bh8i
<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.
Guest52 has joined #crystal-lang
Guest52 has quit [Client Quit]
Guest79 has joined #crystal-lang
Guest79 has quit [Client Quit]
ur5us_ has joined #crystal-lang
lucf117 has joined #crystal-lang