mock-oauth-2-server

1.0.3 • Public • Published

Mock OAuth2 server for testing

Mock Data

const mockData = {
  client: {
    id : 'oauth2_application_client_id',
    secret : 'oauth2_application_secret',
    redirectUris : ['http://localhost:5000/oauth2/redirect/callback'],
    grants: ['authorization_code']
  },
  user: {
    id : '123',
    uuid : 'dkalfyeoiqajaof',
    email: 'brad@email.com'
  },
  jwtSecret: 'jwt_secret_key'
};

generateAccessToken

const defaultGenerateAccessToken(client, user, scope) {
  return jwt.sign(user, 'im_a_secret', { algorithm: 'HS512', jwtid: uuid() });
},

Dependencies (7)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i mock-oauth-2-server

    Weekly Downloads

    21

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • soniyazinnia
    • gaurisharma_zinnia
    • anton_striapunin
    • oleksandr_policygenius
    • volodymyrklymov
    • ivanhulko
    • artemshevchenko
    • rajeshbhasin
    • larry.huot
    • lukehorak-zinnia
    • donatastubutis-zinnia
    • juan.escobar
    • manvick-zinnia
    • birdswitharms
    • michael.dorman
    • ludo-zinnia
    • jesse-pg
    • nocolin3
    • randy-the-robot
    • m1gd0n
    • bennettd1
    • kobie.thomas
    • neelmay
    • kelly_porter
    • pgengineering
    • wellshuxley
    • showell215
    • pique
    • anton.karounis_pg
    • anthonygomezpg
    • justin.coh
    • jenny.lee
    • jasonunger.pg
    • aciccone
    • luisrevillam
    • mdnorth