-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'beta' into v2/result-types
- Loading branch information
Showing
14 changed files
with
218 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
import Foundation | ||
|
||
public extension URL { | ||
/** | ||
Returns an Auth0 domain URL given a domain | ||
extension URL { | ||
|
||
- parameter domain: name of your Auth0 account | ||
|
||
- returns: URL of your Auth0 account | ||
*/ | ||
static func a0_url(_ domain: String) -> URL { | ||
let urlString: String | ||
if !domain.hasPrefix("https") { | ||
urlString = "https://\(domain)" | ||
} else { | ||
urlString = domain | ||
} | ||
static func httpsURL(from domain: String) -> URL { | ||
let prefix = !domain.hasPrefix("https") ? "https://" : "" | ||
let suffix = !domain.hasSuffix("/") ? "/" : "" | ||
let urlString = "\(prefix)\(domain)\(suffix)" | ||
return URL(string: urlString)! | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.