Skip to content

OAuth2: Setting custom attributes with authorization code generation is not supported #111

@ivan-novakov

Description

@ivan-novakov

The OAuthV2 Apigee policy supports storing custom attributes with the authorization code generation. These attributes are then transferred to the corresponding access token and are available during access token verification.

This functionality is not supported currently by the Volos OAuth2 library with the Apigee implementation when used remotely. I could add custom attributes only when generating the token, not the code.

Here is how the code generation function looks like:

OAuthImpl.prototype.generateAuthorizationCode = function(options, cb) {
  var r = _.pick(options,
    'clientId', 'redirectUri', 'scope', 'state'
  );
  r.responseType = 'code';
  debug('generateAuthorizationCode: %j', r);
[...]

There is no support for the "attributes" parameter which is present in the token generation function.

Even if I add "attributes" there and they are sent to the "apigee-remote-proxy" endpoint, it seems that the "apigee-access" library doesn't support this as well.

Am I doing something wrong or this is really not supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions