55°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • Aaron Parecki https://aaronparecki.com/   •   Jul 5

    tl;dr The more I think about it, the more I think this parameter enables a use case that isn't really necessary. The me parameter in the code exchange step specifically allows for a token endpoint to be detached from both the Micropub endpoint and the authorization endpoint.

    Full details below.

    The different use cases that are all supported right now:

    Integrated Micropub/Token/Authorization Endpoints

    This is the simplest case in terms of architecture, but the most amount of work for a developer. In this case, someone writes all three parts of the system. Since they are part of the same system, the mechanism by which the token endpoint validates authorization codes does not need to be standardized, it's all internal.

    Both my website and the Wordpress IndieAuth plugin fall under this case.

    Authorization Endpoint Service, Built-In Token and Micropub Endpoints

    In this case, someone is building a CMS that includes a Micropub endpoint as well as a token endpoint. However, they want to speed up their development, so they use an authorization endpoint service such as indieauth.com.

    The client sends the auth code to the token endpoint, and since the token endpoint is part of the CMS, it already knows the only place it can go to validate the auth code is the authorization endpoint service that it's configured to use. Therefore there is no need for the me parameter, which normally tells the token endpoint where to go to verify the auth code.

    Authorization Endpoint and Token Endpoint Service

    Specifically this case is where a service provides both an authorization endpoint and token endpoint. This is the quickest path to building a Micropub endpoint, since all you need to do is build out the Micropub endpoint itself, and when any requests come in with a token, the endpoint goes and checks whether the token is valid by testing it against the token endpoint service.

    This is a very common case with peoples' individual websites, as it offloads the development and maintenance of the security bits to a service. I provide these as a service at indieauth.com and tokens.indieauth.com.

    The interesting thing though is that when a single service provides both, there is also no need for the me parameter at the code exchange step, since the token endpoint already knows where it needs to verify the authorization code since the code was issued by the same system.

    Separate Authorization Endpoint and Token Endpoint Services

    The only case where the me is needed is when the authorization endpoint and token endpoint are both used as services and they are separate services. Imagine a standalone token endpoint service: the job of this service is to verify authorization codes and issue access tokens, and later verify access tokens. In this situation, a request comes in with an unknown authorization code and it needs to verify it. Since it was not part of the system that issued the code, it needs to know how to verify it. Right now, this is enabled because this request also includes the me parameter, so the token endpoint goes and looks up the user's authorization endpoint and verifies the code there.

    The thing I'm realizing though is that this is really quite an edge case, and one that I don't think is actually very important. Typically someone who is building a Micropub endpoint themselves will first start by using an authorization/token endpoint service, and there is no benefit to them if those are two separate services. In fact it's probably easier if they are just part of the same system since it's less moving parts to think about at this stage.

    Later, that person can decide they want to take over issuing tokens, but still don't want to build out the UI of an authorization service. At this point, they fall under the second use case above. They build out a token endpoint into their software, and since they're using the authorization endpoint service they know where to verify authorization codes.

    On the other end of the spectrum, you have people who build the whole thing out themselves, like my website and the Wordpress plugin. In these cases the me is completely irrelevant in the code exchange step.

    The particular situation that the me enables is using a separate service for the authorization and token endpoints, and I can't think of a case where that is actually important.

    Aaron Parecki

    Here's a quick survey of current implementations of token endpoints:

    Integrated Micropub/Token/Authorization Endpoints

    • p3k - verifies the me parameter exists, but does not use it for anything
    • Wordpress IndieAuth plugin - verifies the me parameter exists, but does not use it for anything source
    • Micro.blog - does not check or use the me parameter details
    • Commentpara.de - does not check or use the me parameter source
    • Skein - does not check or use the me parameter source
    • Known - does not check or use the me parameter source
    • Silo.pub - checks that the authorization code was issued to the me in the request. not strictly necessary since it ends up using the me that is stored with the authorization code anyway. source

    Authorization Endpoint Service, Built-In Token and Micropub Endpoints

    • Redwind - uses indieauth.com as the authorization endpoint service source
    • Neonblog - uses indieauth.com auth.php token.php

    Authorization Endpoint and Token Endpoint Service

    • acquiescence - verifies the me parameter exists, but does not use it source

    Standalone Token Endpoint Service

    • tokens.indieauth.com - uses the me to find the authorization endpoint to verify the code source
      • In practice, most people end up using tokens.indieauth.com along with indieauth.com since those are the examples in all the documentation.
    • mintoken - uses the me to find the authorization endpoint, but only allows a whitelisted set of endpoints to be used source readme
      • This makes mintoken on the edge of a standalone service, since it does end up being tied to particular authorization endpoints. It does provide the ability to be used with multiple, so the me parameter enables this feature.
    Portland, Oregon, USA • 77°F
    Thu, Jul 5, 2018 9:21pm -07:00
  • 00dani https://github.com/00dani   •   Jun 26

    An alternative possibility would be to prescribe the format of IndieAuth access codes, as part of the standard. For instance, we could prefix the usual arbitrary implementation-specific access code blob with the expected me value, making it easy for token endpoints to discover the correct authorization endpoint. code=https://00dani.me/$C5r1cuqJk1fUTGrWX4DPHz44jxpgHF or something like that. Then, of course, pure OAuth 2.0 clients would pass through that extra piece of information with no trouble whatsoever, since it's embedded in an existing standard parameter.

    It's certainly a messy approach, though, and one might question whether OAuth client compatibility is worth adding this complexity to IndieAuth. Additionally, making a change like this now would introduce potential incompatibility: a token endpoint that knows it can pull information out of the access code might still receive an access code from an authorization endpoint that doesn't embed information in the prescribed format, for instance.

    Still, prescribing a format for access codes might not be quite as unreasonable as it seems: after all, client IDs are also treated as opaque in pure OAuth 2.0, whereas in IndieAuth they have a prescribed and meaningful format.

    Aaron Parecki

    tl;dr The more I think about it, the more I think this parameter enables a use case that isn't really necessary. The me parameter in the code exchange step specifically allows for a token endpoint to be detached from both the Micropub endpoint and the authorization endpoint.

    Full details below.

    The different use cases that are all supported right now:

    Integrated Micropub/Token/Authorization Endpoints

    This is the simplest case in terms of architecture, but the most amount of work for a developer. In this case, someone writes all three parts of the system. Since they are part of the same system, the mechanism by which the token endpoint validates authorization codes does not need to be standardized, it's all internal.

    Both my website and the Wordpress IndieAuth plugin fall under this case.

    Authorization Endpoint Service, Built-In Token and Micropub Endpoints

    In this case, someone is building a CMS that includes a Micropub endpoint as well as a token endpoint. However, they want to speed up their development, so they use an authorization endpoint service such as indieauth.com.

    The client sends the auth code to the token endpoint, and since the token endpoint is part of the CMS, it already knows the only place it can go to validate the auth code is the authorization endpoint service that it's configured to use. Therefore there is no need for the me parameter, which normally tells the token endpoint where to go to verify the auth code.

    Authorization Endpoint and Token Endpoint Service

    Specifically this case is where a service provides both an authorization endpoint and token endpoint. This is the quickest path to building a Micropub endpoint, since all you need to do is build out the Micropub endpoint itself, and when any requests come in with a token, the endpoint goes and checks whether the token is valid by testing it against the token endpoint service.

    This is a very common case with peoples' individual websites, as it offloads the development and maintenance of the security bits to a service. I provide these as a service at indieauth.com and tokens.indieauth.com.

    The interesting thing though is that when a single service provides both, there is also no need for the me parameter at the code exchange step, since the token endpoint already knows where it needs to verify the authorization code since the code was issued by the same system.

    Separate Authorization Endpoint and Token Endpoint Services

    The only case where the me is needed is when the authorization endpoint and token endpoint are both used as services and they are separate services. Imagine a standalone token endpoint service: the job of this service is to verify authorization codes and issue access tokens, and later verify access tokens. In this situation, a request comes in with an unknown authorization code and it needs to verify it. Since it was not part of the system that issued the code, it needs to know how to verify it. Right now, this is enabled because this request also includes the me parameter, so the token endpoint goes and looks up the user's authorization endpoint and verifies the code there.

    The thing I'm realizing though is that this is really quite an edge case, and one that I don't think is actually very important. Typically someone who is building a Micropub endpoint themselves will first start by using an authorization/token endpoint service, and there is no benefit to them if those are two separate services. In fact it's probably easier if they are just part of the same system since it's less moving parts to think about at this stage.

    Later, that person can decide they want to take over issuing tokens, but still don't want to build out the UI of an authorization service. At this point, they fall under the second use case above. They build out a token endpoint into their software, and since they're using the authorization endpoint service they know where to verify authorization codes.

    On the other end of the spectrum, you have people who build the whole thing out themselves, like my website and the Wordpress plugin. In these cases the me is completely irrelevant in the code exchange step.

    The particular situation that the me enables is using a separate service for the authorization and token endpoints, and I can't think of a case where that is actually important.

    Portland, Oregon, USA • 77°F
    2 likes 1 reply
    Thu, Jul 5, 2018 8:33pm -07:00 #indieauth
  • Gargron https://github.com/Gargron   •   Jul 6

    Yep I just discovered that. Could just remove those particular tests...

    Aaron Parecki
    That would work ๐Ÿ˜ƒ

    The only downside to this change is until the rest of the mf2 parsers are updated they'll be getting bad parse results from Mastodon permalinks. Could be good incentive to hurry up on updating those parsers tho ๐Ÿ˜‚
    Portland, Oregon, USA • 86°F
    Thu, Jul 5, 2018 5:23pm -07:00
  • Gargron https://github.com/Gargron   •   Jul 5

    But what about posts with no CW?

    Aaron Parecki
    The thing that stopped me from sending a PR for this is that the Ruby parser doesn't have the updated rules, so it's not possible to create a good test case in Mastodon for the changes. Just removing the class right now will break a bunch of tests that are expecting the name property.
    Portland, Oregon, USA • 86°F
    Thu, Jul 5, 2018 4:53pm -07:00
  • Gargron https://github.com/Gargron   •   Jul 5

    But what about posts with no CW?

    Aaron Parecki

    Posts with no CW would end up with just a content property. According to the new parsing rules, those look just like normal content-only posts and sites don't see a name property and treat them as normal text/microblog/toot/tweet posts.

    Portland, Oregon, USA • 86°F
    Thu, Jul 5, 2018 4:51pm -07:00
  • Gargron https://github.com/Gargron   •   Jul 5

    I read somewhere p-name is no longer necessary?

    Aaron Parecki

    A change in the Microformats parsing spec from a few months ago reduced the cases where parsers would auto-generate a name property if there wasn't one in the original markup.

    Previously, when the name was autogenerated, people ended up having to add an explicit name property to the HTML in order to avoid weird broken-looking names. Now that this change is approved and implemented in a couple parsers, things are working a lot better. I believe the Ruby parser has not yet implemented this change, but it's in the Python and PHP ones.

    Certainly one option is Mastodon could just remove the p-name class, since the newer parsers would end up seeing those posts with just the summary and content properties.

    Since afaik no Microformats consumers have the concept of CW/spoiler posts yet, this does raise the issue of how to provide a good fallback behavior for consumers that don't understand spoiler posts. My thought with moving the p-name class to the same element as p-summary is that the current consumers will see it as an "article", most likely only showing the name of the article. Here's an example of how my site renders comments that have a name (whether or not there is also summary or content)

    Similarly, here's what my site shows when I'm replying to a post that has a name:

    If the p-name class is used only for the CW/spoiler preview text, then my site wouldn't show the full content in either the reply context or as a comment, which seems like the safest fallback behavior.

    Portland, Oregon, USA • 86°F
    9 replies
    Thu, Jul 5, 2018 4:43pm -07:00
  • Jamey Sharp https://toot.cat/@jamey   •   Jul 5

    I want to build a quick little web site for a thing and I'm facing analysis paralysis over which programming language to write it in, augh ๐Ÿ˜ 

    Aaron Parecki
    Which language would be the easiest for you to deploy and maintain going forward?
    Portland, Oregon • 80°F
    1 like 1 reply
    Thu, Jul 5, 2018 2:59pm -07:00
  • Carl Hancock ๐Ÿš€ http://www.gravityforms.com   •   Jul 5
    There are obviously ways to do it. But the problem is it introduces friction. Users have to do X before they can do Y. Instead of just being able to connect an app to their WP site without having to install additional tools. WP needs a core solution for authentication.
    Aaron Parecki
    Absolutely. I was more implying that someone should take this plugin and move it into core as a quick way to get OAuth into WordPress, since the work is already done.
    Portland, Oregon, USA • 80°F
    1 like 17 replies
    Thu, Jul 5, 2018 2:39pm -07:00
  • DΛVID V3.0.5 https://davidwolfpaw.com/   •   Jul 5
    Similarly, if I had the proper skillset I'd love to push for more methods to be included like OpenID and IndieAuth.
    Aaron Parecki
    Check out the work done on the IndieAuth plugin: https://wordpress.org/plugins/indieauth/

    It also works as authentication for the REST API. IndieAuth has the benefit of not needing to pre-register clients, so it is actually useful in a distributed setting like how WordPress works.
    Portland, Oregon • 80°F
    5 likes 20 replies
    Thu, Jul 5, 2018 2:34pm -07:00
  • zoglesby https://github.com/zoglesby   •   Jul 5

    #71 Missing Channel

    Aaron Parecki
    In Together, the notifications channel is the little bell icon in the top right corner!
    Portland, Oregon, USA • 63°F
    2 replies
    Thu, Jul 5, 2018 9:04am -07:00
  • cactus https://github.com/cactus   •   Jul 4

    go-camo was indeed originally intended to proxy only images, for two reasons: 1) the camo project it was inspired by only proxied images 2) my use-case at the time only required proxying of images

    Later, a fork was created by a user to additionally proxy fonts and css. I wasn't comfortable including those in go-camo -- see discussion on https://github.com/cactus/go-camo/issues/20.

    In my experience, video files are "usually" either linked (by url, no content warning), uploaded (service hosts it, so no content warning), or inlined from some hosting service (eg. youtube, vimeo; ssl provided by service). Video files are also generally much larger than image content.

    Can you further describe your use-case/requirements for proxying video?

    Aaron Parecki

    Ah, I can see why css/js could be an issue for some uses.

    I'm using this on the server side of my new social reader application so that all image/video URLs presented to the reader apps are https and from the same origin. The videos come from either Instagram, Twitter, or peoples' own blogs hosting video files directly. Because the majority of the content is twitter-like short posts, the video files are normally always under a minute long so they aren't actually that big.

    Portland, Oregon, USA • 78°F
    Wed, Jul 4, 2018 2:02pm -07:00
  • sknebel https://github.com/sknebel   •   Jul 4

    Looking at this again, I'm not sure what a good spot for a general note would be.

    If you ok it I'd prepare a pull request adding the header to the examples?

    Aaron Parecki

    At the very least adding the Accept header to the examples is a good place to start, go for it!

    Portland, Oregon, USA • 78°F
    Wed, Jul 4, 2018 1:58pm -07:00
  • gRegorLove https://github.com/gRegorLove   •   Jul 4

    #179 Move this repo to the microformats github org

    Aaron Parecki
    Nope, I also don't have permission to create repositories on the Microformats org on GitHub.
    Portland, Oregon • 78°F
    Wed, Jul 4, 2018 1:56pm -07:00
  • bradbarrish https://micro.blog/bradbarrish   •   Jul 4

    @aaronpk certainly not crying about a Facebook service shitting down. Just checked out your service, which looks cool, though Iโ€™d rather it be HTTPS. I really love Gyroscope, which has a great service for location as well. Web, iOS and Android. You should talk to them.

    Aaron Parecki
    I'm not sure what you mean you think it should be HTTPS? My app is just an app and it sends data to whatever url you configure.

    Gyroscope is neat, and I've met their CTO, but I prefer to have that data in a place that's under my own control.
    Portland, Oregon • 71°F
    Tue, Jul 3, 2018 9:08pm -07:00
  • nitinthewiz https://github.com/nitinthewiz   •   Jul 3

    @aaronpk could you share this script that adds the weather data? I'd like to add that to my setup.

    Aaron Parecki
    Sure thing! Here's the script I use, you'll need to fill in the three API keys at the top of the file, and of course replace compass.p3k.io with your own domain. https://aaronparecki.com/2018/07/03/7/
    Portland, Oregon • 61°F
    Tue, Jul 3, 2018 11:56am -07:00
  • Ton Zijlstra http://zylstra.org/blog   •   Jul 3
    Describing my ideal RSS reader, https://www.zylstra.org/blog/2018/07/my-ideal-rss-reader/ Maybe @TinyTinyRss_com can be the starting point for some tinkering #Indieweb #RSS
    Aaron Parecki
    Pretty cool ideas! You can definitely create the group/folder model with the current #indieweb readers. I'd love to add a search feature to Monocle and Aperture too!
    Portland, Oregon • 59°F
    Tue, Jul 3, 2018 10:02am -07:00 #indieweb
  • James R. Hull ๐ŸŽฌ http://narrativefirst.com   •   Jul 3
    @aaronpk let me know if this is not the placeโ€ฆsigned up to Aperture, added rel link to footer (hosted m.b.). Added a channel (my m.b) and Aperture grabbed latest entries. But Indigenous shows nothing.
    Aaron Parecki
    Probably better to debug in the chat, Eddie (who made Indigenous) can help out there too. https://indieweb.org/discuss
    Portland, Oregon • 58°F
    Tue, Jul 3, 2018 8:54am -07:00
  • Jonathan LaCour https://cleverdevil.io/profile/cleverdevil   •   Jul 3
    Honestly? Face ID is vastly inferior to Touch ID. Itโ€™d not even close. Iโ€™m hoping generation two makes the same kind of leap forward as Touch ID 2 did.
    Aaron Parecki
    I'm holding on to my 6s until it stops being able to update
    Portland, Oregon • 60°F
    Mon, Jul 2, 2018 9:56pm -07:00
  • Jonathan LaCour https://cleverdevil.io/profile/cleverdevil   •   Jul 2

    Add native support for Indiepaper

    Aaron Parecki
    Awesome. Iโ€™d love to figure out a good way to do that token exchange automatically but itโ€™s a good idea to prototype it out manually first!
    Portland, Oregon • 71°F
    Mon, Jul 2, 2018 6:52pm -07:00
  • Eddie Hinkle https://eddiehinkle.com/   •   permalink

    So many toots! ๐Ÿ˜†๐Ÿ˜†

    Aaron Parecki
    someone must be following my replies feed!
    Portland, Oregon • 65°F
    Mon, Jul 2, 2018 2:38pm -07:00
older

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • ๐ŸŽฅ YouTube Tutorials and Reviews
  • ๐Ÿ  We're building a triplex!
  • โญ๏ธ Life Stack
  • โš™๏ธ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv