@@ -56,17 +56,17 @@ exports = module.exports = internals.Plugin = function (server, connections, env
56
56
} ;
57
57
58
58
this . auth = {
59
- default : function ( options ) {
59
+ default : function ( opts ) {
60
60
61
- self . _applyChild ( 'auth.default' , 'auth' , 'default' , [ options ] ) ;
61
+ self . _applyChild ( 'auth.default' , 'auth' , 'default' , [ opts ] ) ;
62
62
} ,
63
63
scheme : function ( name , scheme ) {
64
64
65
65
self . _applyChild ( 'auth.scheme' , 'auth' , 'scheme' , [ name , scheme ] ) ;
66
66
} ,
67
- strategy : function ( name , scheme , mode , options ) {
67
+ strategy : function ( name , scheme , mode , opts ) {
68
68
69
- self . _applyChild ( 'auth.strategy' , 'auth' , 'strategy' , [ name , scheme , mode , options ] ) ;
69
+ self . _applyChild ( 'auth.strategy' , 'auth' , 'strategy' , [ name , scheme , mode , opts ] ) ;
70
70
} ,
71
71
test : function ( name , request , next ) {
72
72
@@ -218,7 +218,7 @@ internals.Plugin.prototype.register = function (plugins /*, [options], callback
218
218
var attributes = plugin . register . attributes ;
219
219
Hoek . assert ( typeof plugin . register . attributes === 'object' , 'Invalid plugin object - invalid or missing register function attributes property' , hint ) ;
220
220
221
- var item = {
221
+ var registration = {
222
222
register : plugin . register ,
223
223
name : attributes . name || ( attributes . pkg && attributes . pkg . name ) ,
224
224
version : attributes . version || ( attributes . pkg && attributes . pkg . version ) || '0.0.0' ,
@@ -227,10 +227,10 @@ internals.Plugin.prototype.register = function (plugins /*, [options], callback
227
227
dependencies : attributes . dependencies
228
228
} ;
229
229
230
- Hoek . assert ( item . name , 'Missing plugin name' , hint ) ;
231
- Schema . assert ( 'dependencies' , item . dependencies , 'must be a string or an array of strings' ) ;
230
+ Hoek . assert ( registration . name , 'Missing plugin name' , hint ) ;
231
+ Schema . assert ( 'dependencies' , registration . dependencies , 'must be a string or an array of strings' ) ;
232
232
233
- registrations . push ( item ) ;
233
+ registrations . push ( registration ) ;
234
234
}
235
235
236
236
Items . serial ( registrations , function ( item , next ) {
@@ -239,8 +239,8 @@ internals.Plugin.prototype.register = function (plugins /*, [options], callback
239
239
240
240
// Protect against multiple registrations
241
241
242
- for ( var i = 0 , il = selection . connections . length ; i < il ; ++ i ) {
243
- var connection = selection . connections [ i ] ;
242
+ for ( var j = 0 , jl = selection . connections . length ; j < jl ; ++ j ) {
243
+ var connection = selection . connections [ j ] ;
244
244
Hoek . assert ( item . multiple || ! connection . _registrations [ item . name ] , 'Plugin' , item . name , 'already registered in:' , connection . info . uri ) ;
245
245
connection . _registrations [ item . name ] = item ;
246
246
}
0 commit comments