Remove the empty comment and set default token
This commit is contained in:
parent
97dc0aa441
commit
0f86f69880
|
@ -1,4 +1,5 @@
|
|||
var loopback = require('../loopback');
|
||||
var AccessToken = require('./access-token');
|
||||
|
||||
/**
|
||||
* Access context represents the context for a request to access protected
|
||||
|
@ -24,7 +25,6 @@ function AccessContext(context) {
|
|||
}
|
||||
context = context || {};
|
||||
|
||||
//
|
||||
this.principals = context.principals || [];
|
||||
var model = context.model;
|
||||
model = ('string' === typeof model) ? loopback.getModel(model) : model;
|
||||
|
@ -37,7 +37,7 @@ function AccessContext(context) {
|
|||
this.method = context.method;
|
||||
|
||||
this.accessType = context.accessType || AccessContext.ALL;
|
||||
this.accessToken = context.accessToken;
|
||||
this.accessToken = context.accessToken || AccessToken.ANONYMOUS;
|
||||
|
||||
var principalType = context.principalType || Principal.USER;
|
||||
var principalId = context.principalId || undefined;
|
||||
|
|
Loading…
Reference in New Issue