Skip to content

Commit

Permalink
Load Auth0 credentials from plist for auth api
Browse files Browse the repository at this point in the history
  • Loading branch information
hzalaz committed Jul 26, 2016
1 parent 39ec5cc commit 9052220
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public class _ObjectiveAuthenticationAPI: NSObject {

private let authentication: Authentication

public override init () {
self.authentication = Auth0.authentication()
}

public convenience init(clientId: String, url: NSURL) {
self.init(clientId: clientId, url: url, session: NSURLSession.sharedSession())
}
Expand Down
6 changes: 5 additions & 1 deletion Auth0/Management/ObjectiveC/_ObjectiveManagementAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public class _ObjectiveManagementAPI: NSObject {

private let management: Management

public init(token: String) {
self.management = Auth0.management(token: token)
}

public convenience init(token: String, url: NSURL) {
self.init(token: token, url: url, session: NSURLSession.sharedSession())
}
Expand Down Expand Up @@ -70,7 +74,7 @@ public class _ObjectiveManagementAPI: NSObject {
}

@objc(unlinkUserWithIdentifier:provider:fromUserId:callback:)
public func unlink(identifier: String, provider provider: String, fromUserId userId: String, callback: (NSError?, [[String: AnyObject]]?) -> ()) {
public func unlink(identifier: String, provider: String, fromUserId userId: String, callback: (NSError?, [[String: AnyObject]]?) -> ()) {
self.management
.users()
.unlink(identityId: identifier, provider: provider, fromUserId:userId)
Expand Down
4 changes: 4 additions & 0 deletions Auth0/WebAuth/ObjectiveC/_ObjectiveWebAuth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public class _ObjectiveOAuth2: NSObject {

private let webAuth: WebAuth

public override init() {
self.webAuth = Auth0.webAuth()
}

public init(clientId: String, url: NSURL) {
self.webAuth = WebAuth(clientId: clientId, url: url)
}
Expand Down

0 comments on commit 9052220

Please sign in to comment.