Skip to content

Commit 902c716

Browse files
authored
Merge pull request #37 from auth0/feature-default-init-plist
Load Auth0 credentials from plist for auth api
2 parents 39ec5cc + 9052220 commit 902c716

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Diff for: Auth0/Authentication/ObjectiveC/_ObjectiveAuthenticationAPI.swift

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ public class _ObjectiveAuthenticationAPI: NSObject {
2727

2828
private let authentication: Authentication
2929

30+
public override init () {
31+
self.authentication = Auth0.authentication()
32+
}
33+
3034
public convenience init(clientId: String, url: NSURL) {
3135
self.init(clientId: clientId, url: url, session: NSURLSession.sharedSession())
3236
}

Diff for: Auth0/Management/ObjectiveC/_ObjectiveManagementAPI.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ public class _ObjectiveManagementAPI: NSObject {
2727

2828
private let management: Management
2929

30+
public init(token: String) {
31+
self.management = Auth0.management(token: token)
32+
}
33+
3034
public convenience init(token: String, url: NSURL) {
3135
self.init(token: token, url: url, session: NSURLSession.sharedSession())
3236
}
@@ -70,7 +74,7 @@ public class _ObjectiveManagementAPI: NSObject {
7074
}
7175

7276
@objc(unlinkUserWithIdentifier:provider:fromUserId:callback:)
73-
public func unlink(identifier: String, provider provider: String, fromUserId userId: String, callback: (NSError?, [[String: AnyObject]]?) -> ()) {
77+
public func unlink(identifier: String, provider: String, fromUserId userId: String, callback: (NSError?, [[String: AnyObject]]?) -> ()) {
7478
self.management
7579
.users()
7680
.unlink(identityId: identifier, provider: provider, fromUserId:userId)

Diff for: Auth0/WebAuth/ObjectiveC/_ObjectiveWebAuth.swift

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public class _ObjectiveOAuth2: NSObject {
2828

2929
private let webAuth: WebAuth
3030

31+
public override init() {
32+
self.webAuth = Auth0.webAuth()
33+
}
34+
3135
public init(clientId: String, url: NSURL) {
3236
self.webAuth = WebAuth(clientId: clientId, url: url)
3337
}

0 commit comments

Comments
 (0)