1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +02:00

Add a JWT-based LDAP/AD authenticator.

This commit is contained in:
Simo Kinnunen 2014-01-23 22:51:46 +09:00
parent 11ad1ffc38
commit 697e552ef0
6 changed files with 342 additions and 1 deletions

View file

@ -11,6 +11,11 @@ function Log(tag, stream) {
, ERROR: 'ERR'.red
, FATAL: 'FTL'.red
}
this.localIdentifier = null
}
Log.prototype.setLocalIdentifier = function(identifier) {
this.localIdentifier = identifier
}
Log.prototype.debug = function() {
@ -39,7 +44,8 @@ Log.prototype.fatal = function() {
Log.prototype._format = function(priority, args) {
return util.format('%s/%s %d [%s] %s',
priority, this.tag, process.pid, Log.globalIdentifier,
priority, this.tag, process.pid,
this.localIdentifier || Log.globalIdentifier,
util.format.apply(util, args))
}