Added token_translator and STACK-2 compat #6
+15 −1
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Added a
token_translator
service. It accepts the OAuth token and returns a value that is to be treated as a STACK-2 token.The
oauth.token
is left for BC and because it might make sense to be able to look specifically for it if you're not in an environment that cares about STACK-2. This can be changed if needed.This is something that I'm using in stack-firewall stuff. It provides a way to translate the raw token value into something usable by the application if it is so desired.
I may still work on providing stack-firewall and/or stack-authentication integration in a bit. :)