mock-oauth-2-server
v1.0.3
Published
``` javascript 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 : 'dkalfye
Downloads
43
Maintainers
Keywords
Readme
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: '[email protected]'
},
jwtSecret: 'jwt_secret_key'
};
generateAccessToken
const defaultGenerateAccessToken(client, user, scope) {
return jwt.sign(user, 'im_a_secret', { algorithm: 'HS512', jwtid: uuid() });
},