Skip to content

Commit

Permalink
Rop api (#116)
Browse files Browse the repository at this point in the history
* returning error without prefix and added os_version

* added forgot password API + os_version

* small codcy fixes

* added missing file

* add done handling

* fix

* finish forgot password

* removed semicolon

* add flow checking

* fix

* fix

* fix

* update Readme

* Update README.md

* update travis xml file

* forwarding the error msg from the callback to the client

* revert travis

* update2
  • Loading branch information
rotembr committed Feb 1, 2018
1 parent b46c16b commit f7257c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BluemixAppIDTests/AuthorizationUIManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public class AuthorizationUIManagerTests: XCTestCase {
func testApplicationErr2() {

let expectation1 = expectation(description: "Obtained tokens")
let manager = AuthorizationUIManager(oAuthManager: oauthManager, authorizationDelegate: delegate(exp: expectation1, errMsg: "Failed to obtain access and identity tokens"), authorizationUrl: "someurl", redirectUri: "someredirect")
let manager = AuthorizationUIManager(oAuthManager: oauthManager, authorizationDelegate: delegate(exp: expectation1, errMsg: "someerr"), authorizationUrl: "someurl", redirectUri: "someredirect")
manager.loginView = MockSafariView(url:URL(string: "http://www.someurl.com")!)
XCTAssertFalse(manager.application(UIApplication.shared, open: URL(string:AppIDConstants.REDIRECT_URI_VALUE.lowercased() + "?code=somecode&error=someerr")!, options: [:]))

Expand Down
4 changes: 2 additions & 2 deletions Source/BluemixAppID/internal/AuthorizationUIManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ public class AuthorizationUIManager {
} else {
let errorDescription = Utils.getParamFromQuery(url: url, paramName: "error_description")
let errorCode = Utils.getParamFromQuery(url: url, paramName: "error_code")
AuthorizationUIManager.logger.error(message: "error: " + err)
AuthorizationUIManager.logger.error(message: "Failed to obtain access and identity tokens, error: " + err)
AuthorizationUIManager.logger.error(message: "errorCode: " + (errorCode ?? "not available"))
AuthorizationUIManager.logger.error(message: "errorDescription: " + (errorDescription ?? "not available"))
self.authorizationDelegate.onAuthorizationFailure(error: AuthorizationError.authorizationFailure("Failed to obtain access and identity tokens"))
self.authorizationDelegate.onAuthorizationFailure(error: AuthorizationError.authorizationFailure(err))
}
})
return false
Expand Down

0 comments on commit f7257c6

Please sign in to comment.