Skip to content

Commit

Permalink
+1
Browse files Browse the repository at this point in the history
  • Loading branch information
borut-t committed Sep 19, 2023
1 parent 4475233 commit 246f570
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Sources/LinkedIn/LinkedInAuthenticator+Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,23 @@ public extension LinkedInAuthenticator {
let clientSecret: String
let permissions: String
let redirectUrl: URL
var authEndpoint: URL = "https://www.linkedin.com/oauth/v2/authorization"
var authCancel: URL = "https://www.linkedin.com/oauth/v2/login-cancel"
let authEndpoint: URL // = "https://www.linkedin.com/oauth/v2/authorization"
let authCancel: URL // = "https://www.linkedin.com/oauth/v2/login-cancel"

public init(clientId: String, clientSecret: String, permissions: String, redirectUrl: URL) {
public init(
clientId: String,
clientSecret: String,
permissions: String,
redirectUrl: URL,
authEndpoint: URL? = nil,
authCancel: URL? = nil
) {
self.clientId = clientId
self.clientSecret = clientSecret
self.permissions = permissions
self.redirectUrl = redirectUrl
self.authEndpoint = authEndpoint ?? "https://www.linkedin.com/oauth/v2/authorization"
self.authCancel = authCancel ?? "https://www.linkedin.com/oauth/v2/login-cancel"
}

func authorizationUrl(state: String) -> URL? {
Expand Down

0 comments on commit 246f570

Please sign in to comment.