lib/jwt.js
function(jwt) {
  try {
    var segments = jwt.split('.');
    this.signature = segments.pop();
    this.signatureBase = segments.join('.');
    this.header = decodeSegment(segments.shift());
    this.payload = decodeSegment(segments.shift());
  } catch (e) {
    throw new Error("Unable to parse JWT");
  }
}
function(jwt) {
  try {
    var segments = jwt.split('.');
    this.signature = segments.pop();
    this.signatureBase = segments.join('.');
    this.header = decodeSegment(segments.shift());
    this.payload = decodeSegment(segments.shift());
  } catch (e) {
    throw new Error("Unable to parse JWT");
  }
}
function ( jwt ) { try { var segments = jwt . split ( '.' ) ; this . signature = segments . pop ( ) ; this . signatureBase = segments . join ( '.' ) ; this . header = decodeSegment ( segments . shift ( ) ) ; this . payload = decodeSegment ( segments . shift ( ) ) ; } catch ( e ) { throw new Error ( "Unable to parse JWT" ) ; } }
Parse an encoded JWT. Does not ensure validaty of the token.

@constructor
@param {String} jwt Encoded JWT
Parse an encoded JWT . Does not ensure validaty of the token .