Skip to content

Commit

Permalink
+1
Browse files Browse the repository at this point in the history
  • Loading branch information
borut-t committed Sep 4, 2023
1 parent bbbdfa9 commit 5327ace
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
4 changes: 1 addition & 3 deletions Sources/LinkedIn/LinkedInAuthenticator+Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@ public extension LinkedInAuthenticator {
let clientId: String
let clientSecret: String
let permissions: String
let code: String
let redirectUrl: URL
let authEndpoint: URL = "https://www.linkedin.com/oauth/v2/authorization"
let authCancel: URL = "https://www.linkedin.com/oauth/v2/authorization-cancel"

public init(clientId: String, clientSecret: String, permissions: String, code: String, redirectUrl: URL) {
public init(clientId: String, clientSecret: String, permissions: String, redirectUrl: URL) {
self.clientId = clientId
self.clientSecret = clientSecret
self.permissions = permissions
self.code = code
self.redirectUrl = redirectUrl
}

Expand Down
14 changes: 2 additions & 12 deletions Sources/LinkedIn/LinkedInAuthenticator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ extension LinkedInAuthenticator: Authenticator {
/// SignIn user.
///
/// Will return promise with the `Response` object on success or with `Error` on error.
public func signIn(with configuration: Configuration) async throws -> Response {
// try await loadData(with: configuration)

public func signIn(authCode: String, configuration: Configuration) async throws -> Response {
let authRequest: LinkedInAPI.LinkedInAuthRequest = .init(
code: configuration.code,
code: authCode,
redirectUri: configuration.redirectUrl.absoluteString,
clientId: configuration.clientId,
clientSecret: configuration.clientSecret
Expand Down Expand Up @@ -77,11 +75,3 @@ public extension LinkedInAuthenticator {
// case alreadySignedIn
}
}

// MARK: - Private Extension
@available(iOS 15.0, *)
private extension LinkedInAuthenticator {
// func loadData(with configuration: Configuration) async throws -> Response {
//
// }
}

0 comments on commit 5327ace

Please sign in to comment.