Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adonisjs/auth

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adonisjs/auth - npm Package Compare versions

Comparing version 3.0.4 to 3.0.5

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="3.0.5"></a>
## [3.0.5](https://github.com/adonisjs/adonis-auth/compare/v3.0.4...v3.0.5) (2018-03-30)
### Features
* **apischeme:** allow clientLogin to accept user instance ([97ba27d](https://github.com/adonisjs/adonis-auth/commit/97ba27d))
<a name="3.0.4"></a>

@@ -2,0 +12,0 @@ ## [3.0.4](https://github.com/adonisjs/adonis-auth/compare/v3.0.3...v3.0.4) (2018-03-18)

2

package.json
{
"name": "@adonisjs/auth",
"version": "3.0.4",
"version": "3.0.5",
"description": "Offical authentication provider for Adonis framework",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -193,10 +193,14 @@ 'use strict'

*
* @param {Function} headerFn - Method to set the header
* @param {Function} sessionFn - Method to set the session
* @param {Object} user - User to login
* @param {Function} headerFn - Method to set the header
* @param {Function} sessionFn - Method to set the session
* @param {Object} tokenOrUser - Pass the token or the user directly
*
* @return {void}
*/
async clientLogin (headerFn, sessionFn, token) {
headerFn('authorization', `Bearer ${token}`)
async clientLogin (headerFn, sessionFn, tokenOrUser) {
if (typeof (tokenOrUser) !== 'string') {
const { token } = await this.generate(tokenOrUser)
tokenOrUser = token
}
headerFn('authorization', `Bearer ${tokenOrUser}`)
}

@@ -203,0 +207,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc