trivago / Heimdallr.swift

Easy to use OAuth 2 library for iOS, written in Swift.
Apache License 2.0
639 stars 86 forks source link

Extract resource request authentication #42

Closed felixvisee closed 9 years ago

felixvisee commented 9 years ago

Although using the HTTP Authorization header is probably the most common way of authenticating with a resource endpoint, there are many other options. Therefore, we should extract how a resource request is authenticated and make it configurable. Something like:

public protocol HeimdallResourceRequestAuthenticator {
  func authenticateResourceRequest(request: NSURLRequest, withAccessToken: OAuthAccessToken) -> NSURLRequest
}