Comments (4)
@BabyAzerty Glad to hear it worked out! 🎉
That would have been my suggestion: Maybe your Wireshark log just did not show the query parameter.
Btw: The basic authentication of the token refresh request is to be expected and conform to the RFC spec, if that wasn't clear:
Because refresh tokens are typically long-lasting credentials used to
request additional access tokens, the refresh token is bound to the
client to which it was issued. If the client type is confidential or
the client was issued client credentials (or assigned other
authentication requirements), the client MUST authenticate with the
authorization server as described in Section 3.2.1.
from heimdallr.swift.
Hey @BabyAzerty!
Im not sure if I understand the problem correctly. Do you have a valid refresh token but the refresh itself does not work for you? Do you get any error logs from Heimdallr in the console?
One thing I've noticed: Your example does not show the required call to requestAccessToken()
to initially request your token. I assume this is done somewhere else in your code?
from heimdallr.swift.
I indeed have a successful requestAccessToken
on my login form
SharedNetwork.instance.heimdallr.requestAccessToken(username: username, password: password) { result in //...
My problem is that when the access token has expired, instead of doing an OAuth refresh grant, Heimdallr does another requestAccessToken
according to WireShark (even though I never call it beside from my login form). The uploaded screenshot shows the call from authenticateRequest(request)
.
Expected behaviour: authenticateRequest
shouldn't send any header but should send form data with grant_type=refresh_token&refresh_token=SOMETHING...
when it needs to refresh the token.
Current behaviour: authenticateRequest
sends header with Authorization: Basic
but no form data when it needs to refresh the token.
from heimdallr.swift.
Okay, I don't know whether it is WireShark that has a problem or not (I think so though) but after trying to log all HTTPHeaders & HTTPBody from Heimdallr and doing additional tests, it seems to be perfectly fine.
from heimdallr.swift.
Related Issues (20)
- 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 (?)
- How to pass scope when using resource owner flow? HOT 4
- 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)
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.