Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Refresh access token without api secret

Not applicable

Is is possible to refresh an access token using API key only. one of our clients don't want to send the API secret as part of the refresh token call? Is it possible?

http://docs.apigee.com/api-services/content/access-tokens#refreshinganaccesstoken says need both API key and secret

Solved Solved
1 5 3,049
1 ACCEPTED SOLUTION

Good question!

Yes, it is possible. But doing so would be counter to the OAuth 2.0 specification. You can find the relevant requirements in Section 6 of IETF RFC 6749. It states:

   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.

Section 3.2.1 specifies that the client should send its id and secret (its credentials) encoded in an HTTP Basic Authentication header.

So I think it would be a Bad Idea to allow refresh without the client credentials.

There is a way to do what you want - basically you have the client pass in the client_id, then lookup the App via AccessEntity, extract the secret, then assign a contrived Basic Authentication header using the extracted secret, before using the policy OAuthV2/RefreshAccessToken.

But you probably shouldn't do that.

Can you explain the justification for the client asking for a refresh without passing the client secret?

4293-rfc-6749-refresh-token.png

View solution in original post

5 REPLIES 5