#dev 2020-10-03

2020-10-03 UTC
#
sebbu
oh, i thought the channel transformed into a NSFW one
geoffo, nickodd, sp1ff, KartikPrabhu, moppy, peterrother, dckc, jamietanna, NinjaTrappeur, sebbu2, shoesNsocks1, [tantek], zootella, skalnik, [schmarty] and [tb] joined the channel
#
[tb]
Actually did want to bring this over here now that I brought it up [Zegnat]
#
[tb]
So re: audience
#
[tb]
That's kind of what I was thinking — my IndieAuth token endpoint actually generates JWTs today so I can use them from other services of mine. I was thinking it might be good to start putting the `aud` claim in them, and so perhaps for each scope I just have a mapping of URLs that would be added to that claim
#
[tb]
And so `create`, `post`, etc. might all map to my Micropub endpoint, but maybe `webmentions:admin` would map to a my backend webmention service
#
Zegnat
Sure. But also note that if your Micropub endpoint is somewhat integrated with your IndieAuth solution, you do not actually need it to use create/post/... at all. Your IndieAuth provider could translate create into create:private create:public create:group create:dm whatever. And put those scopes on the token instead of create.
#
Zegnat
Lots of possibilities. You could also just have separate UI in your IndieAuth flow where you can select audience values to assign. Even if they were not specifically requested by the application
leg, lexly and [tb] joined the channel
#
[tb]
Ah yeah lots of options there
geoffo, leg, deltab, KartikPrabhu, [schmarty] and shoesNsocks1 joined the channel; nickodd left the channel
#
GWG
aaronpk: Shouldn't the changelog also mention that grant_type is now required when posting to the authorization endpoint?
#
GWG
Because that is also a breaking change, technically speaking.
#
aaronpk
i suppose so! I didn't realize it was optional before
#
GWG
aaronpk: It was nonexistent.
#
GWG
aaronpk: If you look at the W3C version of the spec, it says to verify an authorization code, which is the previous post option to the authorization endpoint, section 5.4 of the W3C edition, you only needed code, client_id, and redirect_uri
#
GWG
This was before the option for independent token/authorization endpoints was dropped from the spec
#
GWG
So, anyone who implemented it that way would get an issue if they start requiring grant_type
#
GWG
The token endpoint always required it
#
GWG
Excuse me, section 6.3.2 of the W3C edition
#
GWG
I'm going to do the same thing I did with response_type....make it work, but put in a notice I will eventually require it
#
GWG
But same issue, with someone not being aware of a possibly breaking change.
#
GWG
I'm going over every part of the flow as I make these changes. This time, I'm adding comments to the code to remind myself in future what I was trying to do
#
aaronpk
can you file issues on github when you find stuff like this?
#
aaronpk
i can't do this change right now
#
GWG
aaronpk: Will do, stepping out, will file on return
#
GWG
I just asked to make sure I wasn't confused
#
Zegnat
Hmm, I forgot how much of those parameters were made optional for the id request :/
#
aaronpk
there should be almost nothing different betweetn the two requests now other than the scopes requested
#
Zegnat
Now yes, then no, haha
geoffo joined the channel
#
GWG
If you don't need an access token, would you ever ask for scopes?
#
Zegnat
Possibly, profile scope
#
GWG
I have to make some modifications to my code to cover that.
#
GWG
Zegnat: Other than profile scope, anything? I may want to lock it down
#
GWG
Conversely...if it only profile scope, is there a use case for getting a token with just a profile scope?
#
Zegnat
I would probably issue a token even with just profile. I guess it would enable someone to refetch the profile information using the token instead of having to request a code exchange anew.
#
Zegnat
I think the only take-away from the spec is that scope is optional because sometimes people just want to validate once. And when scope was empty in the first request, you should not issue them a token at all. But that is it. So before the code exchange step you should not really care about whether scope is empty or filled in