Skip to content
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

Load Auth0 credentials from plist for auth api #37

Merged
merged 1 commit into from
Jul 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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