Skip to content

Commit

Permalink
In progress change of tests with async/await
Browse files Browse the repository at this point in the history
  • Loading branch information
ldesplat committed Nov 19, 2017
1 parent 5333b41 commit 1e3c5b7
Show file tree
Hide file tree
Showing 56 changed files with 4,290 additions and 4,557 deletions.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ server.register(require('bell'), function (err) {
path: '/login', // The callback endpoint registered with the provider
config: {
auth: 'twitter',
handler: function (request, reply) {
handler: function (request, h) {

if (!request.auth.isAuthenticated) {
return reply('Authentication failed due to: ' + request.auth.error.message);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ server.register(require('bell'), function (err) {
path: '/login', // The callback endpoint registered with the provider
config: {
auth: 'twitter',
handler: function (request, reply) {
handler: function (request, h) {

if (!request.auth.isAuthenticated) {
return reply('Authentication failed due to: ' + request.auth.error.message);
Expand Down
2 changes: 1 addition & 1 deletion examples/arcgisonline.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ server.register(Bell, (err) => {
path: '/bell/door',
config: {
auth: 'arcgisonline',
handler: function (request, reply) {
handler: function (request, h) {

reply('<pre>' + JSON.stringify(request.auth.credentials, null, 4) + '</pre>');
}
Expand Down
2 changes: 1 addition & 1 deletion examples/discord.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ server.register(Bell, (err) => {
path: '/bell/door',
config: {
auth: 'discord',
handler: function (request, reply) {
handler: function (request, h) {

reply('<pre>' + JSON.stringify(request.auth.credentials, null, 4) + '</pre>');
}
Expand Down
2 changes: 1 addition & 1 deletion examples/facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ server.register(Bell, (err) => {
strategy: 'facebook',
mode: 'try'
},
handler: function (request, reply) {
handler: function (request, h) {

if (!request.auth.isAuthenticated) {
return reply('Authentication failed due to: ' + request.auth.error.message);
Expand Down
2 changes: 1 addition & 1 deletion examples/google.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ server.register(Bell, (err) => {
strategy: 'google',
mode: 'try'
},
handler: function (request, reply) {
handler: function (request, h) {

if (!request.auth.isAuthenticated) {
return reply('Authentication failed due to: ' + request.auth.error.message);
Expand Down
2 changes: 1 addition & 1 deletion examples/linkedin.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ server.register(Bell, (err) => {
path: '/bell/door',
config: {
auth: 'linkedin',
handler: function (request, reply) {
handler: function (request, h) {

reply('<pre>' + JSON.stringify(request.auth.credentials, null, 4) + '</pre>');
}
Expand Down
2 changes: 1 addition & 1 deletion examples/meetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ server.register(Bell, (err) => {
path: '/bell/door',
config: {
auth: 'meetup',
handler: function (request, reply) {
handler: function (request, h) {

reply('<pre>' + JSON.stringify(request.auth.credentials, null, 4) + '</pre>');
}
Expand Down
2 changes: 1 addition & 1 deletion examples/nest.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ server.register(Bell, (err) => {
path: '/bell/door',
config: {
auth: 'nest',
handler: function (request, reply) {
handler: function (request, h) {

reply('<pre>' + JSON.stringify(request.auth.credentials, null, 4) + '</pre>');
}
Expand Down
4 changes: 2 additions & 2 deletions examples/office365.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ server.register(Bell, (err) => {
providerParams: {
response_type: 'code'
},
scope: ['openid','offline_access', 'profile']
scope: ['openid', 'offline_access', 'profile']
/**
*You'll need an Office 365 account to set up an application and get a clientID and ClientSecret
*This is a helpful tutorial for the whole process: https://dev.outlook.com/restapi/tutorial/node
Expand All @@ -37,7 +37,7 @@ server.register(Bell, (err) => {
strategy: 'office',
mode: 'try'
},
handler: function (request, reply) {
handler: function (request, h) {

if (!request.auth.isAuthenticated) {
return reply('Authentication failed due to: ' + request.auth.error.message);
Expand Down
4 changes: 2 additions & 2 deletions examples/okta.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ server.register([require('hapi-auth-cookie'), require('../')], (err) => {
path: '/auth/okta',
config: {
auth: 'okta',
handler: function (request, reply) {
handler: function (request, h) {

if (!request.auth.isAuthenticated) {
return reply(Boom.unauthorized('Authentication failed: ' + request.auth.error.message));
Expand All @@ -52,7 +52,7 @@ server.register([require('hapi-auth-cookie'), require('../')], (err) => {
path: '/',
config: {
auth: 'session',
handler: function (request, reply) {
handler: function (request, h) {

//Return a message using the information from the session
return reply('Hello, ' + request.auth.credentials.profile.email + '!');
Expand Down
2 changes: 1 addition & 1 deletion examples/slack.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ server.register(Bell, (err) => {
path: '/bell/door',
config: {
auth: 'slack',
handler: function (request, reply) {
handler: function (request, h) {

reply('<pre>' + JSON.stringify(request.auth.credentials, null, 4) + '</pre>');
}
Expand Down
2 changes: 1 addition & 1 deletion examples/twitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ server.register(Bell, (err) => {
path: '/bell/door',
config: {
auth: 'twitch',
handler: function (request, reply) {
handler: function (request, h) {

if (!request.auth.isAuthenticated) {
return reply('Authentication failed due to: ' + request.auth.error.message);
Expand Down
2 changes: 1 addition & 1 deletion examples/twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ server.register(Bell, (err) => {
path: '/bell/door',
config: {
auth: 'twitter',
handler: function (request, reply) {
handler: function (request, h) {

reply('<pre>' + JSON.stringify(request.auth.credentials, null, 4) + '</pre>');
}
Expand Down
Loading

0 comments on commit 1e3c5b7

Please sign in to comment.