This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Initial Device Flow implementation#38
Merged
Merged
Conversation
added 29 commits
April 13, 2016 22:06
Based on draft 01 of "OAuth 2.0 Device Flow" at https://tools.ietf.org/html/draft-ietf-oauth-device-flow-01
These will be used to simulate a server and a proxy server, respectively.
This will allow us to stub special cases without needing to add helper methods every time.
This will allow us to write tests that can respond differently to otherwise identical-looking POST requests, such as when the client receives "authorization_pending" and tries again after some interval. http://wiremock.org/stateful-behaviour.html
We need readErrorToString() because when the response code indicates an error, asking for the inputStream will throw an exception that appears to originate from a call to getResponseCode().
I originally wrote this class for jenkinsci/tfs-plugin and I need it pretty much as-is for this project, as well.
"The default value [for http.nonProxyHosts] excludes all common variations of the loopback address." Because the host name came back as example.local, the proxy server would be bypassed and the test would fail.
This will allow subclasses thereof to augment some of the behaviour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
These changes implement the OAuth 2.0 Device Flow according to my interpretation of the
draft-ietf-oauth-device-flow-01specification.