{"size": 696, "ext": "js", "max_stars_repo_path": "lib/providers/pingfed.js", "max_stars_repo_name": "userfront/bell", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/providers/pingfed.js", "max_issues_repo_name": "userfront/bell", "max_issues_repo_issues_event_min_datetime": "2020-12-28T21:31:18.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-17T16:02:13.000Z", "max_forks_repo_path": "lib/providers/pingfed.js", "max_forks_repo_name": "userfront/bell", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 9, "max_forks_count": null, "avg_line_length": 23.2, "max_line_length": 62, "alphanum_fraction": 0.5862068966}
"use strict";

const internals = {};

exports = module.exports = function (options) {
  options = options || {};

  const uri = options.uri || "https://login-dev.ext.hpe.com";

  return {
    protocol: "oauth2",
    auth: uri + "/as/authorization.oauth2",
    token: uri + "/as/token.oauth2",
    scope: ["openid", "email"],
    scopeSeparator: " ",
    useParamsAuth: true,
    profile: async function (credentials, params, get) {
      const profile = await get(uri + "/idp/userinfo.openid");

      credentials.profile = {
        id: profile.sub,
        username: profile.email,
        displayName: profile.email,
        email: profile.email,
        raw: profile,
      };
    },
  };
};
