UrlFactory
class UrlFactory : IUrlFactory
Creates basic OAuth 2.0 endpoints URLs
-
object provides basic endpoints
Declaration
Swift
private let endpoints: IEndpoints
-
Creates authorization url for the specified domain.
Declaration
Swift
init(_ endpoints: IEndpoints = Endpoints())
Parameters
endpoints
object provides basic endpoints
-
Creates authorization url for the specified domain.
Declaration
Swift
public func getAuthServerHost(for domain: String) -> URL?
Parameters
domain
domain, auth url should be created with.
Return Value
auth url
-
Creates logout url for the specified domain with or without https prefix.
Declaration
Swift
public func getLogoutUrl(for domain: String, shouldAddHttpsPrefix: Bool) -> URL?
Parameters
domain
domain, logout url should be created with.
shouldAddHttpsPrefix
specifies should the https prefix be used.
Return Value
logout url
-
Creates token request url for the specified domain.
Declaration
Swift
public func getTokenRequestUrl(for domain: String) -> URL?
Parameters
domain
domain, token request url should be created with.
Return Value
token request url