-
Notifications
You must be signed in to change notification settings - Fork 4
Language library refactor #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
graceyim
wants to merge
198
commits into
develop
Choose a base branch
from
lang-library-refactor
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
198 commits
Select commit
Hold shift + click to select a range
48ea471
Remove pairUri()
7ac476e
Refactor authUri() and update tests
aa7e347
Update javadocs comment for allowInlinePairing
1e44fc2
Create getUserManagementUrl() with test
e73ee87
Rename uri to url
095ada0
Refactor getAuthenticationUrl() so that it treats extras as a black box
3950292
Rename PairingStatus to Pairing
4ec06eb
Update javadocs for extras
0b21d02
Rename validate to validatePostback
9e39d2e
Create User class and update Pairing and tests
aa92de3
Add comment for old test
c8f0375
Rename getPairingStatus to getPairing
09a6844
Use JSONObject for HttpClientMock
3cdf869
Replace ToopherAPI.getPairing() with ToopherAPI.advanced.pairings.get…
550e518
Correct javadocs for setToopherEnabledForUser()
5537363
Rename AuthenticationStatus to AuthenticationRequest
c62a8ef
Create UserTerminal class
f03db07
Add variables to setUp() and DEFAULT_BASE_URL for tests
60bc22b
Create ToopherAPI.advanced.authenticationRequests.getById()
eb23d15
Create ToopherAPI.advanced.users.getById()
27edf24
Cleanup ToopherAPI, TestToopherAPI and User
472fc33
Create ToopherAPI.advanced.users.getByName()
244f105
Create ToopherAPI.advanced.users.create()
7a98127
Fix endpoint in Users.getByName()
b5ed216
Create ToopherAPI.advanced.userTerminals.getById()
2cb4de7
Create Action object
995612c
Add Action and User to AuthenticationRequest object
308bc31
Remove raw from UserTerminal
34d72a1
Create ApiRawRequester class for get() and post()
c7b2798
Refactor pair() to handle regular, QR and SMS pairings
582d7d9
Add terminalNameExtra to tests
c555c1a
Remove old getAuthenticationStatus()
ad38f26
Refactor authenticate() to handle authentication with username or pai…
ab268af
Add AuthenticationRequest.authenticate_with_otp()
98068e3
Add update() to Action
0d1073d
Add update() and remove raw from User
10b9fac
Add update() to UserTerminal
db58896
Update AuthenticationRequest with update methods
8a56fe0
Add AuthenticationRequest.refreshFromServer()
d98b233
Add toString() for UserTerminal
d5b943e
Update User when updating UserTerminal
37b4045
Add UserTerminal.refreshFromServer()
1e5a666
Remove raw from Pairing
b8a82dc
Add Pairing.refresh_from_server() and update()
810075d
Make update() private in AuthenticationRequest and Pairing
0f2832e
Change DEFAULT_TTL to 300
75d01cd
Add Pairing.getResetLink()
d914a07
Add Pairing object to test setUp()
24a1c17
Add Pairing.emailResetLink()
8d5be41
Add extras to params in Pairing.getResetLink()
8fb9adc
Use ApiRawRequester.post(endpoint, params) when extras are null
5849894
Add ApiRawRequester.get(endpoint, params) for when extras are null
7f42379
Update HttpClientMock and add ResponseMock to mock 2 responses to tes…
a5b13df
Rename endpoint for UserTerminal.getById to be consistent with other …
1dc677c
Rename DEFAULT_BASE_URL endpoint in tests to be consistent with Tooph…
c75cacb
Add reason_code to AuthenticationRequest
3acc683
Use camelCase, not snake_case
8797998
Add api to User(s), UserTerminal(s), AuthenticationRequest(s) and Pai…
914f390
Rename authenticateWithOtp to grantWithOtp
2f97790
Fix testAdvancedUsersCreateWithExtras()
6208a4a
Rename User.enabled to User.toopherAuthenticationEnabled
44e80f7
Update setter for User.toopherAuthenticationEnabled
5886e7e
Use camelCase, not snake_case
ce03544
Add User.refreshFromServer()
3245a80
Add User.enableToopherAuthentication()
dafc853
Add User.disableToopherAuthentication()
edf2bf4
Add User.reset()
68a10f5
Rename raw to rawResponse in ApiResponseObject
125abd7
Clean up javadocs
82d24b0
Add Pairing.getQrCodeImage()
2e3fd06
Use String.format for strings
97fbb04
Use DEFAULT_BASE_URL in ToopherAPI tests
cb6e296
Clean up tests for Pairing
90ed945
Clean up tests for AuthenticationRequest
13d560f
Update HttpClientMock.getLastCalledEndpoint() to return endpoint with…
ac2ef13
Clean up tests for AuthenticationRequest
1a288fe
Update HttpClientMock.getLastCalledEndpoint() to return endpoint with…
9976b68
Remove methods from ToopherAPI that have been moved to Authentication…
c4d9bfd
Add UserTerminals.create to replace assignUserFriendlyNameToTerminal
09f4dcd
Clean up ApiRawRequester.get() and post()
efcfec1
Update HttpClientMock.getExpectedResponse to return expectedResponseB…
43d28a3
Clean up and add tests for ToopherAPI
4eded8f
Merge branch 'lang-library-refactor' of github.com:toopher/toopher-ja…
c2787bf
Clean up tests for ToopherIframe
1136bb4
Remove leading / from User.reset endpoint
463276b
Initialize json responses in @BeforeClass
93998ee
Clean up and add tests for User
53b6310
Clean up and add tests for User
401a531
Clean up and add tests for UserTerminal
49fc0ba
Use @BeforeClass instead of @Before for TestAuthenticationRequest
6d4fcb3
Add javadocs and clean up UserTerminal
383d5be
Add ApiResponseObject.updateRawResponse for updates
4d70f06
Add javadocs and clean up User
4596371
Add javadocs and clean up Pairing
c0733fc
Update javadocs and clean up Pairing
d8e15e2
Update javadocs and clean up ToopherAPI
70a894b
Update javadocs and clean up AuthenticationRequest
84b6948
Update ToopherAPIDemo
c74c5e9
Update ApiResponseObject.updateRawResponse to throw JSONException
ea0334f
Update Action.update to throw JSONException
3941910
Update AuthenticationRequest to throw JSONException
9620d5a
Update Pairing to throw JSONException
c306d73
Update ToopherAPI to throw JSONException
ff5f479
Update ToopherAPIDemo to catch JSONException
7537370
Update User to throw JSONException
0a75c6b
Update UserTerminal to throw JSONException
9ae00c4
Update README with new pair() and authenticate()
908b880
Update Iframe README
7692512
Rename validate to validatePostback
793733e
Rename ToopherAPI to ToopherApi
88af71b
Use 'this' in AdvancedApiUsageFactory
0657c5c
Use 'this' in AdvancedApiUsageFactory
d6e8794
Merge branch 'lang-library-refactor' of github.com:toopher/toopher-ja…
8713b8d
Fix spacing in AuthenticationRequest
6d6e486
Rename ToopherAPI/TestToopherAPI to ToopherApi/TestToopherApi
253e225
Update rawResponse for Action
ea2ec6c
Use old style of testing authenticationUrl by assertEquals oauth_sign…
e41e635
Reformat all com.toopher files
d6d4312
Use URI instead of java.net.URI
a200088
Add links to objects in javadocs
9657937
Add User.toopher_authentication_enabled and remove disable_toopher_auth
355e0e5
Rename terminal_name_extra to requester_specified_terminal_id
33e2e38
Rename UserTerminal.name_extra to requester_specified_id
3eeba27
Update javadocs for ToopherIframe.getUserManagementUrl
e5f8f1d
Update ToopherAPIDemo
bbdadbb
Combine declaration and initialization of result
03307d6
No need to remove before put on JSONObject
0771e7a
Add ToopherPairingDeactivatedError to parseRequestError
7fef957
Update testCreateSmsPairing to use number formatted as phone number
f2e3f4f
Use getToopherApi() to create new ToopherApi
16d9168
Return new User from Users.getByName instead of getById
6934eed
Remove expectedUriResponses since Users.getByName only needs one resp…
0e3f02d
Fix ant build errors
576abfd
Check if resetEmail is null before adding to params
1843190
Update README
abc168b
Cleanup DEMO text
5116514
Replace deprecated DefaultHttpClient
90b34e0
Add demo command for mvn
f0e518a
Remove unnecessary printlns
4e3d5b6
Refactor ToopherApi.authenticate to accept terminalName and requester…
14ab3cf
Test ToopherIframe.dateOverride and nonceOverride
4868b83
Add CONTRIBUTING.md for dependency and test info
74c15f2
Add ToopherIframe test for validatePostback without TTL
b4babee
Add method overrides for getAuthenticationUrl and add tests
4a7a1f1
Add test for ToopherIframe creation and getDate
a71fd0a
Add default resetEmail for getUserManagementUrl and test
ba80c76
Add javadocs for getAuthenticationUrl
79be413
Add tests for parseRequestError
71d09b4
Test oauth_signature when extras are passed to getAuthenticationUrl
61480b1
Add tests for Users.getByName
449b59e
Remove unused method overrides
4c8ff2b
Add test for AuthenticationRequest.toString
dacc7a5
Add test for User.toString
c35ea4a
Add test for UserTerminal.toString
928ddfb
Add test for Pairing.toString
d41163c
Update pom to exclude ToopherAPIDemo from jacoco reports
2579295
Add tests for ToopherApi create
3a6c32c
Expand tests for ToopherApi.authenticate
9a3c837
Cleanup ToopherApi.authenticate
7b50e68
Add tests for parseRequestError
3d16992
Add test for empty QR response body
af65c63
Make sure tests fail when expected error is not thrown
da83107
Test ResponseHandler when response body is empty
2baa847
Add another test for getAuthenticationUrl
fccbad2
Assert error codes are correct for ToopherClientErrors
ebbc7c5
Add method override for ToopherIframe.getUserManagementUrl
f4fcdb9
Add override for ToopherIframe.validatePostback and test
b376468
Rename validatePostback to processPostback
bcfebb0
Add getExtrasForUrl helper method for tests
f2cee13
Add getPostbackData helper method for tests
23d80de
Move ToopherIframe.setDateOverride to test setUp
33451c0
Update tests to throw SignatureValidationError instead of try/catch b…
83d3e91
Update ToopherApi tests
e5d9b58
Refactor getAuthenticationUrl and tests
00f9c64
Use processPostback to verify authenticity of ToopherIframe postback …
25c13aa
Use Iframe instead of iframe
a7279dc
Add isAuthenticationGranted and tests
df1a990
Add ttl and expires to params in getOAuthUrl
fdb2891
Set defaults for resetEmail, sessionToken and requesterMetadata as em…
ea0422e
Add resetEmail to extras for getUserManagementUrl
5ecf996
Use a map for Toopher iframe postback data
ec1513c
Increase test coverage for ToopherIframe
2572a4a
Merge branch 'develop' of github.com:toopher/toopher-java into lang-l…
8a247e2
Update js for ToopherIframe postback data
4343e29
Update demo to match toopher-python
9a8e733
Include baseUri when creating new instance of ToopherApi
8b8ca34
Add MIT license
42f2d2a
Update ToopherIframe tests to throw URISyntaxException for processPos…
71bf1b7
Cleanup javadocs
972fff5
Refactor ToopherApi.authenticate
6846030
Reorder methods in ToopherIframe
037f956
Remove unused exception
b16dcb8
Remove unused imports
8775465
Add license to README
fe388e9
Add processPostback test for keys with empty values
376d07f
Simplify README and add iframe info
31b2ebd
Bump pom.xml version to 2.0.0-PREVIEW
dshafer ca0a89b
Add jar-with-dependencies goal
dshafer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Refactor pair() to handle regular, QR and SMS pairings
- Loading branch information
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a big vague. I think we'll want to add some additional information, like "This return a PNG that should be scanned by the user to complete the pairing process."