Comments (4)
Hey!
regarding to RFC, passing a scope is optional. Unfortunately we don't support this right now in a more elegant way than you described already. We currently offer two public methods for requesting the access token:
public func requestAccessToken(username username: String, password: String, completion: Result<Void, NSError> -> ())
public func requestAccessToken(grantType grantType: String, parameters: [String: String], completion: Result<Void, NSError> -> ())
Only having had a short look at it, we could think about deprecating those in the long term and just using a single function that takes a OAuthAuthorizationGrant
as its parameter like we do here. The only problem that I see here is that we would expose a manual way to refresh the access token. Maybe we can finde a way around this? What do you think?
In the other hand, if this is the way to do this, maybe consider adding it to the readme, or add an overload (I can create a PR).
A pull request would be awesome 👍
from heimdallr.swift.
Hey,
Thank for you for your response!
What do you think of an extension that received grant type and scope and call to this func?
This will not expose anything that is not public already...
from heimdallr.swift.
Hey! I think an extension is a nice temporary solution, but for the framework itself I would prefer deprecating the current request functions and introducing a unified one that takes an OAuthAuthorizationGrant
. I currently can't find the time to do it myself. Would you like to tackle this in a pull request? Happy to give you pointers in the right direction 😊
from heimdallr.swift.
Maybe expose only one function that receive grant and params? Or only params as the grant can be part of the params? Than we can add extension methods for specific grants.
What do you think?
from heimdallr.swift.
Related Issues (20)
- Support for SSL connections using self-signed certificates HOT 1
- Remove Argo? HOT 1
- Prevent firing multiple requests? HOT 3
- Update Result dependency to version 3.0.0 HOT 2
- Can't build with Carthage HOT 2
- FYI Xcode 8/iOS 10 Keychain issues HOT 4
- expiresAt value: timeInterval.flatMap(toNSDate) vs NSDate(timeInterval)
- Grant Type Failure HOT 2
- Support for Swift Package Manager ? HOT 4
- lude
- Can't Import after cocoa pods
- Install via Carthage, stuck on ReactiveObjC HOT 1
- Add dot release based on latest master for carthage?
- New release based on master?
- pointer being freed was not allocated
- how to handle different status code
- Version 3.7.0 not available through cocoa pods
- SwiftUI support? HOT 1
- FYI / congrats (?)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heimdallr.swift.