From 4ab7c95bb3eedd4655ff3d9301a1c45dde6023ba Mon Sep 17 00:00:00 2001 From: Justin Greenberg Date: Mon, 21 Nov 2016 13:18:04 -0500 Subject: [PATCH] fix(docs/new-features): syntax highlighting (#347) --- .../authentication/docs/new-1.0-features.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/authentication/docs/new-1.0-features.md b/packages/authentication/docs/new-1.0-features.md index 2c69d75ad2..e87c88cd5e 100644 --- a/packages/authentication/docs/new-1.0-features.md +++ b/packages/authentication/docs/new-1.0-features.md @@ -6,19 +6,19 @@ You can override this property for each passport authentication strategy like so: - ```js - // when calling from hooks - auth.hooks.authenticate('local', { assignProperty: 'custom' }) - // when calling from middleware - auth.express.authenticate('local', { assignProperty: 'custom' }) - // For sockets and all other methods you can have it in your main - // config or pass explicitly when initializing auth. - app.configure(authentication({ - local: { - assignProperty: 'custom' - } - })) - ``` +```js +// when calling from hooks +auth.hooks.authenticate('local', { assignProperty: 'custom' }) +// when calling from middleware +auth.express.authenticate('local', { assignProperty: 'custom' }) +// For sockets and all other methods you can have it in your main +// config or pass explicitly when initializing auth. +app.configure(authentication({ + local: { + assignProperty: 'custom' + } +})) +``` ## More warnings and debugging @@ -200,4 +200,4 @@ socket.on('logout', function(tokenPayload, info) { If you need this information in a custom route or other middleware you can access the currently authenticated entity (ie. user) and whether the request is authenticated by inspecting `req.` (ie. `req.user`) and `req.authenticated`. ### In Hooks/Services -If you need this information in a hook or service you can access the current currently authenticated entity (ie. user) and whether they are authenticated by inspecting `hook.params.` (ie. `hook.params.user`) and `hooks.params.authenticated` respectively. \ No newline at end of file +If you need this information in a hook or service you can access the current currently authenticated entity (ie. user) and whether they are authenticated by inspecting `hook.params.` (ie. `hook.params.user`) and `hooks.params.authenticated` respectively.