<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 14, 2015 at 4:57 PM, Andy McKay <span dir="ltr"><<a href="mailto:amckay@mozilla.com" target="_blank">amckay@mozilla.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>We'll probably want to provide some sort of "token narrowing" API to<br>enable this in a more secure fashion.<br><br>If for example, Mozilla Concrete has a token with scope<br>"profile+payments+SuperSecretOtherThing", then it doesn't want to pass<br>that token directly to other services.  Instead, it could call some API<br>on the oauth server to generate a fresh subsidiary token with only<br>"payments" scope, and pass that token to the payments service.”</div><div><br></div></div></blockquote></div><br></div><div class="gmail_extra">I'm working on adding "refresh tokens" to OAuth this week. If you haven't read in the OAuth2 spec about them, basically you'd get a refresh_token that would be used to fetch short lived access_tokens (instead of the forever-living ones now). You can optionally specify scope and ttl of this access_token. So you could basically do `POST /v1/token?scope=payments&ttl=60` to get a payment token for 60 seconds, and pass that one...</div></div>