AuthenticationRepository
public struct AuthenticationRepository : AuthenticationRepositoryProtocol
A concrete implementation of the AuthenticationRepositoryProtocol
.
-
Initializes an instance of
AuthenticationRepository
.Declaration
Swift
public init(networkingClient: EPINetworkingClientProtocol)
Parameters
networkingClient
The networking client to use for API calls.
-
Obtains new access token with given OAuth request.
Declaration
Swift
public func refreshAccessToken(request: OAuthRequest) -> AnyPublisher<AccessToken, NetworkError>
Parameters
request
The OAuth request containing the necessary information.
Return Value
A publisher that emits an
AccessToken
or aNetworkError
if the operation fails.