apinf / apinf-fiware

FIWARE IdM OAuth2 handler for Meteor.
European Union Public License 1.1
1 stars 3 forks source link

Dynamically set Authorization Header in getTokens Method #11

Closed vellames2 closed 7 years ago

vellames2 commented 7 years ago

On the line 126 of "fiware_server.js", it is necessary that the Authorization header be sent to get the access token. The Authorization is maded by the combination of: base64(client_id:secret) In the moment, the authorization header are static, we need to get the client_id and secret for configuration and generate the header dynamically

midyan commented 7 years ago

I fixed this issue on this commit

I'm getting the following error while trying to get the accessToken after retrieving the authentication code.

Error in OAuth Server: getTokens error. Failed to complete OAuth handshake with FIWARE IdM. failed [401] {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}

And even though this error occurs, the login to FIWARE is successful. I have no idea of what might be causing this.

vellames2 commented 7 years ago

@midyan can you send a pull request for review?