");
$input.on("blur.tt", function($e) {
var active, isActive, hasActive;
active = document.activeElement;
isActive = $menu.is(active);
hasActive = $menu.has(active).length > 0;
if (_.isMsie() && (isActive || hasActive)) {
$e.preventDefault();
$e.stopImmediatePropagation();
_.defer(function() {
$input.focus();
});
}
});
$menu.on("mousedown.tt", function($e) {
$e.preventDefault();
});
},
_onSelectableClicked: function onSelectableClicked(type, $el) {
this.select($el);
},
_onDatasetCleared: function onDatasetCleared() {
this._updateHint();
},
_onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) {
this._updateHint();
if (this.autoselect) {
var cursorClass = this.selectors.cursor.substr(1);
this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass);
}
this.eventBus.trigger("render", suggestions, async, dataset);
},
_onAsyncRequested: function onAsyncRequested(type, dataset, query) {
this.eventBus.trigger("asyncrequest", query, dataset);
},
_onAsyncCanceled: function onAsyncCanceled(type, dataset, query) {
this.eventBus.trigger("asynccancel", query, dataset);
},
_onAsyncReceived: function onAsyncReceived(type, dataset, query) {
this.eventBus.trigger("asyncreceive", query, dataset);
},
_onFocused: function onFocused() {
this._minLengthMet() && this.menu.update(this.input.getQuery());
},
_onBlurred: function onBlurred() {
if (this.input.hasQueryChangedSinceLastFocus()) {
this.eventBus.trigger("change", this.input.getQuery());
}
},
_onEnterKeyed: function onEnterKeyed(type, $e) {
var $selectable;
if ($selectable = this.menu.getActiveSelectable()) {
if (this.select($selectable)) {
$e.preventDefault();
$e.stopPropagation();
}
} else if (this.autoselect) {
if (this.select(this.menu.getTopSelectable())) {
$e.preventDefault();
$e.stopPropagation();
}
}
},
_onTabKeyed: function onTabKeyed(type, $e) {
var $selectable;
if ($selectable = this.menu.getActiveSelectable()) {
this.select($selectable) && $e.preventDefault();
} else if (this.autoselect) {
if ($selectable = this.menu.getTopSelectable()) {
this.autocomplete($selectable) && $e.preventDefault();
}
}
},
_onEscKeyed: function onEscKeyed() {
this.close();
},
_onUpKeyed: function onUpKeyed() {
this.moveCursor(-1);
},
_onDownKeyed: function onDownKeyed() {
this.moveCursor(+1);
},
_onLeftKeyed: function onLeftKeyed() {
if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
}
},
_onRightKeyed: function onRightKeyed() {
if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
}
},
_onQueryChanged: function onQueryChanged(e, query) {
this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty();
},
_onWhitespaceChanged: function onWhitespaceChanged() {
this._updateHint();
},
_onLangDirChanged: function onLangDirChanged(e, dir) {
if (this.dir !== dir) {
this.dir = dir;
this.menu.setLanguageDirection(dir);
}
},
_openIfActive: function openIfActive() {
this.isActive() && this.open();
},
_minLengthMet: function minLengthMet(query) {
query = _.isString(query) ? query : this.input.getQuery() || "";
return query.length >= this.minLength;
},
_updateHint: function updateHint() {
var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match;
$selectable = this.menu.getTopSelectable();
data = this.menu.getSelectableData($selectable);
val = this.input.getInputValue();
if (data && !_.isBlankString(val) && !this.input.hasOverflow()) {
query = Input.normalizeQuery(val);
escapedQuery = _.escapeRegExChars(query);
frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i");
match = frontMatchRegEx.exec(data.val);
match && this.input.setHint(val + match[1]);
} else {
this.input.clearHint();
}
},
isEnabled: function isEnabled() {
return this.enabled;
},
enable: function enable() {
this.enabled = true;
},
disable: function disable() {
this.enabled = false;
},
isActive: function isActive() {
return this.active;
},
activate: function activate() {
if (this.isActive()) {
return true;
} else if (!this.isEnabled() || this.eventBus.before("active")) {
return false;
} else {
this.active = true;
this.eventBus.trigger("active");
return true;
}
},
deactivate: function deactivate() {
if (!this.isActive()) {
return true;
} else if (this.eventBus.before("idle")) {
return false;
} else {
this.active = false;
this.close();
this.eventBus.trigger("idle");
return true;
}
},
isOpen: function isOpen() {
return this.menu.isOpen();
},
open: function open() {
if (!this.isOpen() && !this.eventBus.before("open")) {
this.input.setAriaExpanded(true);
this.menu.open();
this._updateHint();
this.eventBus.trigger("open");
}
return this.isOpen();
},
close: function close() {
if (this.isOpen() && !this.eventBus.before("close")) {
this.input.setAriaExpanded(false);
this.menu.close();
this.input.clearHint();
this.input.resetInputValue();
this.eventBus.trigger("close");
}
return !this.isOpen();
},
setVal: function setVal(val) {
this.input.setQuery(_.toStr(val));
},
getVal: function getVal() {
return this.input.getQuery();
},
select: function select($selectable) {
var data = this.menu.getSelectableData($selectable);
if (data && !this.eventBus.before("select", data.obj, data.dataset)) {
this.input.setQuery(data.val, true);
this.eventBus.trigger("select", data.obj, data.dataset);
this.close();
return true;
}
return false;
},
autocomplete: function autocomplete($selectable) {
var query, data, isValid;
query = this.input.getQuery();
data = this.menu.getSelectableData($selectable);
isValid = data && query !== data.val;
if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) {
this.input.setQuery(data.val);
this.eventBus.trigger("autocomplete", data.obj, data.dataset);
return true;
}
return false;
},
moveCursor: function moveCursor(delta) {
var query, $candidate, data, suggestion, datasetName, cancelMove, id;
query = this.input.getQuery();
$candidate = this.menu.selectableRelativeToCursor(delta);
data = this.menu.getSelectableData($candidate);
suggestion = data ? data.obj : null;
datasetName = data ? data.dataset : null;
id = $candidate ? $candidate.attr("id") : null;
this.input.trigger("cursorchange", id);
cancelMove = this._minLengthMet() && this.menu.update(query);
if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) {
this.menu.setCursor($candidate);
if (data) {
if (typeof data.val === "string") {
this.input.setInputValue(data.val);
}
} else {
this.input.resetInputValue();
this._updateHint();
}
this.eventBus.trigger("cursorchange", suggestion, datasetName);
return true;
}
return false;
},
destroy: function destroy() {
this.input.destroy();
this.menu.destroy();
}
});
return Typeahead;
function c(ctx) {
var methods = [].slice.call(arguments, 1);
return function() {
var args = [].slice.call(arguments);
_.each(methods, function(method) {
return ctx[method].apply(ctx, args);
});
};
}
}();
(function() {
"use strict";
var old, keys, methods;
old = $.fn.typeahead;
keys = {
www: "tt-www",
attrs: "tt-attrs",
typeahead: "tt-typeahead"
};
methods = {
initialize: function initialize(o, datasets) {
var www;
datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1);
o = o || {};
www = WWW(o.classNames);
return this.each(attach);
function attach() {
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor;
_.each(datasets, function(d) {
d.highlight = !!o.highlight;
});
$input = $(this);
$wrapper = $(www.html.wrapper);
$hint = $elOrNull(o.hint);
$menu = $elOrNull(o.menu);
defaultHint = o.hint !== false && !$hint;
defaultMenu = o.menu !== false && !$menu;
defaultHint && ($hint = buildHintFromInput($input, www));
defaultMenu && ($menu = $(www.html.menu).css(www.css.menu));
$hint && $hint.val("");
$input = prepInput($input, www);
if (defaultHint || defaultMenu) {
$wrapper.css(www.css.wrapper);
$input.css(defaultHint ? www.css.input : www.css.inputWithNoHint);
$input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null);
}
MenuConstructor = defaultMenu ? DefaultMenu : Menu;
eventBus = new EventBus({
el: $input
});
input = new Input({
hint: $hint,
input: $input,
menu: $menu
}, www);
menu = new MenuConstructor({
node: $menu,
datasets: datasets
}, www);
status = new Status({
$input: $input,
menu: menu
});
typeahead = new Typeahead({
input: input,
menu: menu,
eventBus: eventBus,
minLength: o.minLength,
autoselect: o.autoselect
}, www);
$input.data(keys.www, www);
$input.data(keys.typeahead, typeahead);
}
},
isEnabled: function isEnabled() {
var enabled;
ttEach(this.first(), function(t) {
enabled = t.isEnabled();
});
return enabled;
},
enable: function enable() {
ttEach(this, function(t) {
t.enable();
});
return this;
},
disable: function disable() {
ttEach(this, function(t) {
t.disable();
});
return this;
},
isActive: function isActive() {
var active;
ttEach(this.first(), function(t) {
active = t.isActive();
});
return active;
},
activate: function activate() {
ttEach(this, function(t) {
t.activate();
});
return this;
},
deactivate: function deactivate() {
ttEach(this, function(t) {
t.deactivate();
});
return this;
},
isOpen: function isOpen() {
var open;
ttEach(this.first(), function(t) {
open = t.isOpen();
});
return open;
},
open: function open() {
ttEach(this, function(t) {
t.open();
});
return this;
},
close: function close() {
ttEach(this, function(t) {
t.close();
});
return this;
},
select: function select(el) {
var success = false, $el = $(el);
ttEach(this.first(), function(t) {
success = t.select($el);
});
return success;
},
autocomplete: function autocomplete(el) {
var success = false, $el = $(el);
ttEach(this.first(), function(t) {
success = t.autocomplete($el);
});
return success;
},
moveCursor: function moveCursoe(delta) {
var success = false;
ttEach(this.first(), function(t) {
success = t.moveCursor(delta);
});
return success;
},
val: function val(newVal) {
var query;
if (!arguments.length) {
ttEach(this.first(), function(t) {
query = t.getVal();
});
return query;
} else {
ttEach(this, function(t) {
t.setVal(_.toStr(newVal));
});
return this;
}
},
destroy: function destroy() {
ttEach(this, function(typeahead, $input) {
revert($input);
typeahead.destroy();
});
return this;
}
};
$.fn.typeahead = function(method) {
if (methods[method]) {
return methods[method].apply(this, [].slice.call(arguments, 1));
} else {
return methods.initialize.apply(this, arguments);
}
};
$.fn.typeahead.noConflict = function noConflict() {
$.fn.typeahead = old;
return this;
};
function ttEach($els, fn) {
$els.each(function() {
var $input = $(this), typeahead;
(typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input);
});
}
function buildHintFromInput($input, www) {
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({
readonly: true,
required: false
}).removeAttr("id name placeholder").removeClass("required").attr({
spellcheck: "false",
tabindex: -1
});
}
function prepInput($input, www) {
$input.data(keys.attrs, {
dir: $input.attr("dir"),
autocomplete: $input.attr("autocomplete"),
spellcheck: $input.attr("spellcheck"),
style: $input.attr("style")
});
$input.addClass(www.classes.input).attr({
spellcheck: false
});
try {
!$input.attr("dir") && $input.attr("dir", "auto");
} catch (e) {}
return $input;
}
function getBackgroundStyles($el) {
return {
backgroundAttachment: $el.css("background-attachment"),
backgroundClip: $el.css("background-clip"),
backgroundColor: $el.css("background-color"),
backgroundImage: $el.css("background-image"),
backgroundOrigin: $el.css("background-origin"),
backgroundPosition: $el.css("background-position"),
backgroundRepeat: $el.css("background-repeat"),
backgroundSize: $el.css("background-size")
};
}
function revert($input) {
var www, $wrapper;
www = $input.data(keys.www);
$wrapper = $input.parent().filter(www.selectors.wrapper);
_.each($input.data(keys.attrs), function(val, key) {
_.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val);
});
$input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input);
if ($wrapper.length) {
$input.detach().insertAfter($wrapper);
$wrapper.remove();
}
}
function $elOrNull(obj) {
var isValid, $el;
isValid = _.isJQuery(obj) || _.isElement(obj);
$el = isValid ? $(obj).first() : [];
return $el.length ? $el : null;
}
})();
});
================================================
FILE: docs/search.json
================================================
{"Structs/ValidateClaimsResult.html#/s:8SwiftJWT20ValidateClaimsResultV11descriptionSSvp":{"name":"description","abstract":"
The human readable description of the ValidateClaimsResult
","parent_name":"ValidateClaimsResult"},"Structs/ValidateClaimsResult.html#/s:8SwiftJWT20ValidateClaimsResultV7successACvpZ":{"name":"success","abstract":"
Successful validation.
","parent_name":"ValidateClaimsResult"},"Structs/ValidateClaimsResult.html#/s:8SwiftJWT20ValidateClaimsResultV17invalidExpirationACvpZ":{"name":"invalidExpiration","abstract":"
Invalid Expiration claim.
","parent_name":"ValidateClaimsResult"},"Structs/ValidateClaimsResult.html#/s:8SwiftJWT20ValidateClaimsResultV7expiredACvpZ":{"name":"expired","abstract":"
Expired token: expiration time claim is in the past.
","parent_name":"ValidateClaimsResult"},"Structs/ValidateClaimsResult.html#/s:8SwiftJWT20ValidateClaimsResultV16invalidNotBeforeACvpZ":{"name":"invalidNotBefore","abstract":"
Invalid Not Before claim.
","parent_name":"ValidateClaimsResult"},"Structs/ValidateClaimsResult.html#/s:8SwiftJWT20ValidateClaimsResultV9notBeforeACvpZ":{"name":"notBefore","abstract":"
Not Before claim is in the future.
","parent_name":"ValidateClaimsResult"},"Structs/ValidateClaimsResult.html#/s:8SwiftJWT20ValidateClaimsResultV15invalidIssuedAtACvpZ":{"name":"invalidIssuedAt","abstract":"
Invalid Issued At claim.
","parent_name":"ValidateClaimsResult"},"Structs/ValidateClaimsResult.html#/s:8SwiftJWT20ValidateClaimsResultV8issuedAtACvpZ":{"name":"issuedAt","abstract":"
Issued At claim is in the future.
","parent_name":"ValidateClaimsResult"},"Structs/ValidateClaimsResult.html#/s:8SwiftJWT20ValidateClaimsResultV2eeoiySbAC_ACtFZ":{"name":"==(_:_:)","abstract":"
Check if two ValidateClaimsResults are equal. Required for the Equatable protocol
","parent_name":"ValidateClaimsResult"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5rs2569publicKeyAC10Foundation4DataV_tFZ":{"name":"rs256(publicKey:)","abstract":"
Initialize a JWTVerifier using the RSA 256 bits algorithm and the provided publicKey.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5rs3849publicKeyAC10Foundation4DataV_tFZ":{"name":"rs384(publicKey:)","abstract":"
Initialize a JWTVerifier using the RSA 384 bits algorithm and the provided publicKey.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5rs5129publicKeyAC10Foundation4DataV_tFZ":{"name":"rs512(publicKey:)","abstract":"
Initialize a JWTVerifier using the RSA 512 bits algorithm and the provided publicKey.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5rs25611certificateAC10Foundation4DataV_tFZ":{"name":"rs256(certificate:)","abstract":"
Initialize a JWTVerifier using the RSA 256 bits algorithm and the provided certificate.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5rs38411certificateAC10Foundation4DataV_tFZ":{"name":"rs384(certificate:)","abstract":"
Initialize a JWTVerifier using the RSA 384 bits algorithm and the provided certificate.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5rs51211certificateAC10Foundation4DataV_tFZ":{"name":"rs512(certificate:)","abstract":"
Initialize a JWTVerifier using the RSA 512 bits algorithm and the provided certificate.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5ps2569publicKeyAC10Foundation4DataV_tFZ":{"name":"ps256(publicKey:)","abstract":"
Initialize a JWTVerifier using the RSA-PSS 256 bits algorithm and the provided publicKey.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5ps3849publicKeyAC10Foundation4DataV_tFZ":{"name":"ps384(publicKey:)","abstract":"
Initialize a JWTVerifier using the RSA-PSS 384 bits algorithm and the provided publicKey.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5ps5129publicKeyAC10Foundation4DataV_tFZ":{"name":"ps512(publicKey:)","abstract":"
Initialize a JWTVerifier using the RSA-PSS 512 bits algorithm and the provided publicKey.","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5hs2563keyAC10Foundation4DataV_tFZ":{"name":"hs256(key:)","abstract":"
Initialize a JWTSigner using the HMAC 256 bits algorithm and the provided privateKey.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5hs3843keyAC10Foundation4DataV_tFZ":{"name":"hs384(key:)","abstract":"
Initialize a JWTSigner using the HMAC 384 bits algorithm and the provided privateKey.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5hs5123keyAC10Foundation4DataV_tFZ":{"name":"hs512(key:)","abstract":"
Initialize a JWTSigner using the HMAC 512 bits algorithm and the provided privateKey.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5es2569publicKeyAC10Foundation4DataV_tFZ":{"name":"es256(publicKey:)","abstract":"
Initialize a JWTVerifier using the ECDSA SHA 256 algorithm and the provided public key.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5es3849publicKeyAC10Foundation4DataV_tFZ":{"name":"es384(publicKey:)","abstract":"
Initialize a JWTVerifier using the ECDSA SHA 384 algorithm and the provided public key.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV5es5129publicKeyAC10Foundation4DataV_tFZ":{"name":"es512(publicKey:)","abstract":"
Initialize a JWTVerifier using the ECDSA SHA 512 algorithm and the provided public key.
","parent_name":"JWTVerifier"},"Structs/JWTVerifier.html#/s:8SwiftJWT11JWTVerifierV4noneACvpZ":{"name":"none","abstract":"
Initialize a JWTVerifier that will always return true when verifying the JWT. This is equivelent to using the “none” alg header.
","parent_name":"JWTVerifier"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5rs25610privateKeyAC10Foundation4DataV_tFZ":{"name":"rs256(privateKey:)","abstract":"
Initialize a JWTSigner using the RSA 256 bits algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5rs38410privateKeyAC10Foundation4DataV_tFZ":{"name":"rs384(privateKey:)","abstract":"
Initialize a JWTSigner using the RSA 384 bits algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5rs51210privateKeyAC10Foundation4DataV_tFZ":{"name":"rs512(privateKey:)","abstract":"
Initialize a JWTSigner using the RSA 512 bits algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5ps25610privateKeyAC10Foundation4DataV_tFZ":{"name":"ps256(privateKey:)","abstract":"
Initialize a JWTSigner using the RSA-PSS 256 bits algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5ps38410privateKeyAC10Foundation4DataV_tFZ":{"name":"ps384(privateKey:)","abstract":"
Initialize a JWTSigner using the RSA-PSS 384 bits algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5ps51210privateKeyAC10Foundation4DataV_tFZ":{"name":"ps512(privateKey:)","abstract":"
Initialize a JWTSigner using the RSA-PSS 512 bits algorithm and the provided privateKey.","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5hs2563keyAC10Foundation4DataV_tFZ":{"name":"hs256(key:)","abstract":"
Initialize a JWTSigner using the HMAC 256 bits algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5hs3843keyAC10Foundation4DataV_tFZ":{"name":"hs384(key:)","abstract":"
Initialize a JWTSigner using the HMAC 384 bits algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5hs5123keyAC10Foundation4DataV_tFZ":{"name":"hs512(key:)","abstract":"
Initialize a JWTSigner using the HMAC 512 bits algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5es25610privateKeyAC10Foundation4DataV_tFZ":{"name":"es256(privateKey:)","abstract":"
Initialize a JWTSigner using the ECDSA SHA256 algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5es38410privateKeyAC10Foundation4DataV_tFZ":{"name":"es384(privateKey:)","abstract":"
Initialize a JWTSigner using the ECDSA SHA384 algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV5es51210privateKeyAC10Foundation4DataV_tFZ":{"name":"es512(privateKey:)","abstract":"
Initialize a JWTSigner using the ECDSA SHA512 algorithm and the provided privateKey.
","parent_name":"JWTSigner"},"Structs/JWTSigner.html#/s:8SwiftJWT9JWTSignerV4noneACvpZ":{"name":"none","abstract":"
Initialize a JWTSigner that will not sign the JWT. This is equivelent to using the “none” alg header.
","parent_name":"JWTSigner"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV20localizedDescriptionSSvp":{"name":"localizedDescription","abstract":"
A human readable description of the error.
","parent_name":"JWTError"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV16invalidJWTStringACvpZ":{"name":"invalidJWTString","abstract":"
Error when an invalid JWT String is provided
","parent_name":"JWTError"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV18failedVerificationACvpZ":{"name":"failedVerification","abstract":"
Error when the JWT signiture fails verification.
","parent_name":"JWTError"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV14osVersionToLowACvpZ":{"name":"osVersionToLow","abstract":"
Error when using RSA encryption with an OS version that is too low.
","parent_name":"JWTError"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV17invalidPrivateKeyACvpZ":{"name":"invalidPrivateKey","abstract":"
Error when an invalid private key is provided for RSA encryption.
","parent_name":"JWTError"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV15invalidUTF8DataACvpZ":{"name":"invalidUTF8Data","abstract":"
Error when the provided Data cannot be decoded to a String
","parent_name":"JWTError"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV12invalidKeyIDACvpZ":{"name":"invalidKeyID","abstract":"
Error when the KeyID field kid in the JWT header fails to generate a JWTSigner or JWTVerifier
","parent_name":"JWTError"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV17missingPEMHeadersACvpZ":{"name":"missingPEMHeaders","abstract":"
Error when a PEM string is provided without the expected PEM headers/footers. (e.g. —–BEGIN PRIVATE KEY—–)
","parent_name":"JWTError"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV2eeoiySbAC_ACtFZ":{"name":"==(_:_:)","abstract":"
Function to check if JWTErrors are equal. Required for equatable protocol.
","parent_name":"JWTError"},"Structs/JWTError.html#/s:8SwiftJWT8JWTErrorV2teoiySbAC_s5Error_ptFZ":{"name":"~=(_:_:)","abstract":"
Function to enable pattern matching against generic Errors.
","parent_name":"JWTError"},"Structs/JWT.html#/s:8SwiftJWT0B0V6headerAA6HeaderVvp":{"name":"header","abstract":"
The JWT header.
","parent_name":"JWT"},"Structs/JWT.html#/s:8SwiftJWT0B0V6claimsxvp":{"name":"claims","abstract":"
The JWT claims
","parent_name":"JWT"},"Structs/JWT.html#/s:8SwiftJWT0B0V6header6claimsACyxGAA6HeaderV_xtcfc":{"name":"init(header:claims:)","abstract":"
Initialize a JWT instance from a Header and Claims.
","parent_name":"JWT"},"Structs/JWT.html#/s:8SwiftJWT0B0V9jwtString8verifierACyxGSS_AA11JWTVerifierVtKcfc":{"name":"init(jwtString:verifier:)","abstract":"
Initialize a JWT instance from a JWT String.","parent_name":"JWT"},"Structs/JWT.html#/s:8SwiftJWT0B0V4sign5usingSSAA9JWTSignerV_tKF":{"name":"sign(using:)","abstract":"
Sign the JWT using the given algorithm and encode the header, claims and signature as a JWT String.
","parent_name":"JWT"},"Structs/JWT.html#/s:8SwiftJWT0B0V6verify_5usingSbSS_AA11JWTVerifierVtFZ":{"name":"verify(_:using:)","abstract":"
Verify the signature of the encoded JWT using the given algorithm.
","parent_name":"JWT"},"Structs/JWT.html#/s:8SwiftJWT0B0V14validateClaims6leewayAA08ValidateD6ResultVSd_tF":{"name":"validateClaims(leeway:)","abstract":"
Validate the time based standard JWT claims.","parent_name":"JWT"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3typSSSgvp":{"name":"typ","abstract":"
Type Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3algSSSgvp":{"name":"alg","abstract":"
Algorithm Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3jkuSSSgvp":{"name":"jku","abstract":"
JSON Web Token Set URL Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3jwkSSSgvp":{"name":"jwk","abstract":"
JSON Web Key Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3kidSSSgvp":{"name":"kid","abstract":"
Key ID Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3x5uSSSgvp":{"name":"x5u","abstract":"
X.509 URL Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3x5cSaySSGSgvp":{"name":"x5c","abstract":"
X.509 Certificate Chain Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3x5tSSSgvp":{"name":"x5t","abstract":"
X.509 Certificate SHA-1 Thumbprint Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV7x5tS256SSSgvp":{"name":"x5tS256","abstract":"
X.509 Certificate SHA-256 Thumbprint Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3ctySSSgvp":{"name":"cty","abstract":"
Content Type Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV4critSaySSGSgvp":{"name":"crit","abstract":"
Critical Header Parameter
","parent_name":"Header"},"Structs/Header.html#/s:8SwiftJWT6HeaderV3typ3jku3jwk3kid3x5u3x5c3x5t0J4S2563cty4critACSSSg_A4NSaySSGSgA3nPtcfc":{"name":"init(typ:jku:jwk:kid:x5u:x5c:x5t:x5tS256:cty:crit:)","abstract":"
Initialize a Header instance.
","parent_name":"Header"},"Structs/AddressClaim.html#/s:8SwiftJWT12AddressClaimV9formattedSSSgvp":{"name":"formatted","abstract":"
Full mailing address, formatted for display or use on a mailing label. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair (“\\r\\n”) or as a single line feed character (“\\n”).
","parent_name":"AddressClaim"},"Structs/AddressClaim.html#/s:8SwiftJWT12AddressClaimV14street_addressSSSgvp":{"name":"street_address","abstract":"
Full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair (“\\r\\n”) or as a single line feed character (“\\n”).
","parent_name":"AddressClaim"},"Structs/AddressClaim.html#/s:8SwiftJWT12AddressClaimV8localitySSSgvp":{"name":"locality","abstract":"
City or locality component.
","parent_name":"AddressClaim"},"Structs/AddressClaim.html#/s:8SwiftJWT12AddressClaimV6regionSSSgvp":{"name":"region","abstract":"
State, province, prefecture, or region component.
","parent_name":"AddressClaim"},"Structs/AddressClaim.html#/s:8SwiftJWT12AddressClaimV11postal_codeSSSgvp":{"name":"postal_code","abstract":"
Zip code or postal code component.
","parent_name":"AddressClaim"},"Structs/AddressClaim.html#/s:8SwiftJWT12AddressClaimV7countrySSSgvp":{"name":"country","abstract":"
Country name component.
","parent_name":"AddressClaim"},"Structs/AddressClaim.html":{"name":"AddressClaim","abstract":"
Struct representing an AddressClaim as defined in the OpenID specs.
"},"Structs/Header.html":{"name":"Header","abstract":"
A representation of a JSON Web Token header."},"Structs/JWT.html":{"name":"JWT","abstract":"
A struct representing the Header and Claims of a JSON Web Token.
"},"Structs/JWTError.html":{"name":"JWTError","abstract":"
A struct representing the different errors that can be thrown by SwiftJWT
"},"Structs/JWTSigner.html":{"name":"JWTSigner","abstract":"
A struct that will be used to sign the JWT Header and Claims and generate a signed JWT."},"Structs/JWTVerifier.html":{"name":"JWTVerifier","abstract":"
A struct that will be used to verify the signature of a JWT is valid for the provided Header and Claims."},"Structs/ValidateClaimsResult.html":{"name":"ValidateClaimsResult","abstract":"
ValidateClaimsResult list the possible results of a call to JWT.validateClaims method."},"Protocols/Claims.html#/s:8SwiftJWT6ClaimsP3exp10Foundation4DateVSgvp":{"name":"exp","abstract":"
The “exp” (expiration time) claim identifies the expiration time on","parent_name":"Claims"},"Protocols/Claims.html#/s:8SwiftJWT6ClaimsP3nbf10Foundation4DateVSgvp":{"name":"nbf","abstract":"
The “nbf” (not before) claim identifies the time before which the JWT","parent_name":"Claims"},"Protocols/Claims.html#/s:8SwiftJWT6ClaimsP3iat10Foundation4DateVSgvp":{"name":"iat","abstract":"
The “iat” (issued at) claim identifies the time at which the JWT was","parent_name":"Claims"},"Protocols/Claims.html#/s:8SwiftJWT6ClaimsP6encodeSSyKF":{"name":"encode()","abstract":"
Encode the Claim object as a Base64 String.
","parent_name":"Claims"},"Protocols/Claims.html":{"name":"Claims","abstract":"
A protocol for representing the claims on a JSON web token."},"Classes/JWTDecoder.html#/s:8SwiftJWT10JWTDecoderC11jwtVerifierAcA11JWTVerifierV_tcfc":{"name":"init(jwtVerifier:)","abstract":"
Initialize a JWTDecoder instance with a single JWTVerifier.
","parent_name":"JWTDecoder"},"Classes/JWTDecoder.html#/s:8SwiftJWT10JWTDecoderC15keyIDToVerifierAcA11JWTVerifierVSgSSc_tcfc":{"name":"init(keyIDToVerifier:)","abstract":"
Initialize a JWTDecoder instance with a function to generate the JWTVerifier from the JWT kid header.
","parent_name":"JWTDecoder"},"Classes/JWTDecoder.html#/s:8SwiftJWT10JWTDecoderC6decode_10fromStringxxm_SStKSeRzlF":{"name":"decode(_:fromString:)","abstract":"
Decode a JWT instance from a JWT String.
","parent_name":"JWTDecoder"},"Classes/JWTDecoder.html#/s:8SwiftJWT10JWTDecoderC6decode_4fromxxm_10Foundation4DataVtKSeRzlF":{"name":"decode(_:from:)","abstract":"
Decode a JWT instance from a utf8 encoded JWT String.
","parent_name":"JWTDecoder"},"Classes/JWTDecoder.html#/s:8SwiftJWT10JWTDecoderC4data16base64urlEncoded10Foundation4DataVSgSS_tFZ":{"name":"data(base64urlEncoded:)","abstract":"
Initializes a new Data from the base64url-encoded String provided. The","parent_name":"JWTDecoder"},"Classes/JWTEncoder.html#/s:8SwiftJWT10JWTEncoderC9jwtSignerAcA9JWTSignerV_tcfc":{"name":"init(jwtSigner:)","abstract":"
Initialize a JWTEncoder instance with a single JWTSigner.
","parent_name":"JWTEncoder"},"Classes/JWTEncoder.html#/s:8SwiftJWT10JWTEncoderC13keyIDToSignerAcA9JWTSignerVSgSSc_tcfc":{"name":"init(keyIDToSigner:)","abstract":"
Initialize a JWTEncoder instance with a function to generate the JWTSigner from the JWT kid header.
","parent_name":"JWTEncoder"},"Classes/JWTEncoder.html#/s:8SwiftJWT10JWTEncoderC6encodey10Foundation4DataVxKSERzlF":{"name":"encode(_:)","abstract":"
Encode a JWT instance into a UTF8 encoded JWT String.
","parent_name":"JWTEncoder"},"Classes/JWTEncoder.html#/s:8SwiftJWT10JWTEncoderC14encodeToStringySSxKSERzlF":{"name":"encodeToString(_:)","abstract":"
Encode a JWT instance as a JWT String.
","parent_name":"JWTEncoder"},"Classes/JWTEncoder.html#/s:8SwiftJWT10JWTEncoderC22base64urlEncodedString4dataSS10Foundation4DataV_tFZ":{"name":"base64urlEncodedString(data:)","abstract":"
Returns a String representation of this data, encoded in base64url format","parent_name":"JWTEncoder"},"Classes/ClaimsStandardJWT.html#/s:8SwiftJWT014ClaimsStandardB0C3iss3sub3aud3exp3nbf3iat3jtiACSSSg_AKSaySSGSg10Foundation4DateVSgA2qKtcfc":{"name":"init(iss:sub:aud:exp:nbf:iat:jti:)","abstract":"
Initialize a ClaimsStandardJWT
","parent_name":"ClaimsStandardJWT"},"Classes/ClaimsStandardJWT.html#/s:8SwiftJWT014ClaimsStandardB0C3issSSSgvp":{"name":"iss","abstract":"
The “iss” (issuer) claim identifies the principal that issued the","parent_name":"ClaimsStandardJWT"},"Classes/ClaimsStandardJWT.html#/s:8SwiftJWT014ClaimsStandardB0C3subSSSgvp":{"name":"sub","abstract":"
The “sub” (subject) claim identifies the principal that is the","parent_name":"ClaimsStandardJWT"},"Classes/ClaimsStandardJWT.html#/s:8SwiftJWT014ClaimsStandardB0C3audSaySSGSgvp":{"name":"aud","abstract":"
The “aud” (audience) claim identifies the recipients that the JWT is","parent_name":"ClaimsStandardJWT"},"Classes/ClaimsStandardJWT.html#/s:8SwiftJWT014ClaimsStandardB0C3exp10Foundation4DateVSgvp":{"name":"exp","abstract":"
The “exp” (expiration time) claim identifies the expiration time on","parent_name":"ClaimsStandardJWT"},"Classes/ClaimsStandardJWT.html#/s:8SwiftJWT014ClaimsStandardB0C3nbf10Foundation4DateVSgvp":{"name":"nbf","abstract":"
The “nbf” (not before) claim identifies the time before which the JWT","parent_name":"ClaimsStandardJWT"},"Classes/ClaimsStandardJWT.html#/s:8SwiftJWT014ClaimsStandardB0C3iat10Foundation4DateVSgvp":{"name":"iat","abstract":"
The “iat” (issued at) claim identifies the time at which the JWT was","parent_name":"ClaimsStandardJWT"},"Classes/ClaimsStandardJWT.html#/s:8SwiftJWT014ClaimsStandardB0C3jtiSSSgvp":{"name":"jti","abstract":"
The “jti” (JWT ID) claim provides a unique identifier for the JWT.","parent_name":"ClaimsStandardJWT"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC3iss3sub3aud3exp3iat9auth_time5nonce3acr3amr3azp4name06given_Q007family_Q007middle_Q08nickname18preferred_username7profile7picture7website5email14email_verified6gender9birthdate8zoneinfo6locale12phone_number21phone_number_verified7address10updated_atACSS_SSSaySSG10Foundation4DateVA8_A8_SgSSSgA10_A5_SgA10_A10_A10_A10_A10_A10_A10_A10_A10_A10_A10_SbSgA10_A10_A10_A10_A10_A12_AA12AddressClaimVSgA9_tcfc":{"name":"init(iss:sub:aud:exp:iat:auth_time:nonce:acr:amr:azp:name:given_name:family_name:middle_name:nickname:preferred_username:profile:picture:website:email:email_verified:gender:birthdate:zoneinfo:locale:phone_number:phone_number_verified:address:updated_at:)","abstract":"
Initalise the ClaimsOpenID
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC3issSSvp":{"name":"iss","abstract":"
Issuer Identifier for the Issuer of the response. The iss value is a case sensitive URL using the https scheme that contains scheme, host, and optionally, port number and path components and no query or fragment components.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC3subSSvp":{"name":"sub","abstract":"
Subject Identifier. A locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client, e.g., 24400320 or AItOawmwtWwcT0k51BayewNvutrJUqsvl6qs7A4. It MUST NOT exceed 255 ASCII characters in length. The sub value is case sensitive.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC3audSaySSGvp":{"name":"aud","abstract":"
Audience(s) that this ID Token is intended for. It MUST contain the OAuth 2.0 client_id of the Relying Party as an audience value. It MAY also contain identifiers for other audiences.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC3exp10Foundation4DateVvp":{"name":"exp","abstract":"
Expiration time on or after which the ID Token MUST NOT be accepted for processing. The processing of this parameter requires that the current date/time MUST be before the expiration date/time listed in the value. Implementers MAY provide for some small leeway, usually no more than a few minutes, to account for clock skew.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC3iat10Foundation4DateVvp":{"name":"iat","abstract":"
Time at which the JWT was issued.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC9auth_time10Foundation4DateVSgvp":{"name":"auth_time","abstract":"
Time when the End-User authentication occurred.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC5nonceSSSgvp":{"name":"nonce","abstract":"
String value used to associate a Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token. If present in the ID Token, Clients MUST verify that the nonce Claim Value is equal to the value of the nonce parameter sent in the Authentication Request. If present in the Authentication Request, Authorization Servers MUST include a nonce Claim in the ID Token with the Claim Value being the nonce value sent in the Authentication Request. Authorization Servers SHOULD perform no other processing on nonce values used.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC3acrSSSgvp":{"name":"acr","abstract":"
Authentication Context Class Reference. String specifying an Authentication Context Class Reference value that identifies the Authentication Context Class that the authentication performed satisfied. The value “0” indicates the End-User authentication did not meet the requirements of ISO/IEC 29115 level 1. Authentications with level 0 SHOULD NOT be used to authorize access to any resource of any monetary value. Parties using this claim will need to agree upon the meanings of the values used, which may be context-specific.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC3amrSaySSGSgvp":{"name":"amr","abstract":"
Authentication Methods References. JSON array of strings that are identifiers for authentication methods used in the authentication. For instance, values might indicate that both password and OTP authentication methods were used. Parties using this claim will need to agree upon the meanings of the values used, which may be context-specific.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC3azpSSSgvp":{"name":"azp","abstract":"
Authorized party - the party to which the ID Token was issued. If present, it MUST contain the OAuth 2.0 Client ID of this party. This Claim is only needed when the ID Token has a single audience value and that audience is different than the authorized party. It MAY be included even when the authorized party is the same as the sole audience.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC4nameSSSgvp":{"name":"name","abstract":"
End-User’s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User’s locale and preferences.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC10given_nameSSSgvp":{"name":"given_name","abstract":"
Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC11family_nameSSSgvp":{"name":"family_name","abstract":"
Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC11middle_nameSSSgvp":{"name":"middle_name","abstract":"
Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC8nicknameSSSgvp":{"name":"nickname","abstract":"
Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC18preferred_usernameSSSgvp":{"name":"preferred_username","abstract":"
Shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC7profileSSSgvp":{"name":"profile","abstract":"
URL of the End-User’s profile page. The contents of this Web page SHOULD be about the End-User.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC7pictureSSSgvp":{"name":"picture","abstract":"
URL of the End-User’s profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC7websiteSSSgvp":{"name":"website","abstract":"
URL of the End-User’s Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC5emailSSSgvp":{"name":"email","abstract":"
End-User’s preferred e-mail address.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC14email_verifiedSbSgvp":{"name":"email_verified","abstract":"
True if the End-User’s e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC6genderSSSgvp":{"name":"gender","abstract":"
End-User’s gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC9birthdateSSSgvp":{"name":"birthdate","abstract":"
End-User’s birthday, represented as an ISO 8601:2004 YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC8zoneinfoSSSgvp":{"name":"zoneinfo","abstract":"
String from zoneinfo time zone database representing the End-User’s time zone. For example, Europe/Paris or America/Los_Angeles.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC6localeSSSgvp":{"name":"locale","abstract":"
End-User’s locale, represented as a BCP47 language tag. This is typically an ISO 639-1 Alpha-2 language code in lowercase and an ISO 3166-1 Alpha-2 country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC12phone_numberSSSgvp":{"name":"phone_number","abstract":"
End-User’s preferred telephone number. E.164 is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC21phone_number_verifiedSbSgvp":{"name":"phone_number_verified","abstract":"
True if the End-User’s phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC7addressAA12AddressClaimVSgvp":{"name":"address","abstract":"
End-User’s preferred postal address.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsOpenID.html#/s:8SwiftJWT12ClaimsOpenIDC10updated_at10Foundation4DateVSgvp":{"name":"updated_at","abstract":"
Time the End-User’s information was last updated.
","parent_name":"ClaimsOpenID"},"Classes/ClaimsMicroProfile.html#/s:8SwiftJWT18ClaimsMicroProfileC3iss3sub3exp3iat3jti3upn6groupsACSS_SS10Foundation4DateVAMS2SSaySSGtcfc":{"name":"init(iss:sub:exp:iat:jti:upn:groups:)","abstract":"
Initialize a ClaimsMicroProfile
","parent_name":"ClaimsMicroProfile"},"Classes/ClaimsMicroProfile.html#/s:8SwiftJWT18ClaimsMicroProfileC3issSSvp":{"name":"iss","abstract":"
The MP-JWT issuer. RFC7519, Section 4.1.1
","parent_name":"ClaimsMicroProfile"},"Classes/ClaimsMicroProfile.html#/s:8SwiftJWT18ClaimsMicroProfileC3subSSvp":{"name":"sub","abstract":"
Identifies the principal that is the subject of the JWT.
","parent_name":"ClaimsMicroProfile"},"Classes/ClaimsMicroProfile.html#/s:8SwiftJWT18ClaimsMicroProfileC3exp10Foundation4DateVvp":{"name":"exp","abstract":"
Identifies the expiration time on or after which the JWT MUST NOT be accepted for processing.
","parent_name":"ClaimsMicroProfile"},"Classes/ClaimsMicroProfile.html#/s:8SwiftJWT18ClaimsMicroProfileC3iat10Foundation4DateVvp":{"name":"iat","abstract":"
Identifies the time at which the JWT was issued.
","parent_name":"ClaimsMicroProfile"},"Classes/ClaimsMicroProfile.html#/s:8SwiftJWT18ClaimsMicroProfileC3jtiSSvp":{"name":"jti","abstract":"
The “jti” (JWT ID) claim provides a unique identifier for the JWT.","parent_name":"ClaimsMicroProfile"},"Classes/ClaimsMicroProfile.html#/s:8SwiftJWT18ClaimsMicroProfileC3upnSSSgvp":{"name":"upn","abstract":"
This MP-JWT custom claim is the user principal name in the java.security.Principal interface, and is the caller principal name in javax.security.enterprise.identitystore.IdentityStore. If this claim is missing, fallback to the “preferred_username”, should be attempted, and if that claim is missing, fallback to the “sub” claim should be used.
","parent_name":"ClaimsMicroProfile"},"Classes/ClaimsMicroProfile.html#/s:8SwiftJWT18ClaimsMicroProfileC18preferred_usernameSSSgvp":{"name":"preferred_username","abstract":"
Shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.
","parent_name":"ClaimsMicroProfile"},"Classes/ClaimsMicroProfile.html#/s:8SwiftJWT18ClaimsMicroProfileC6groupsSaySSGvp":{"name":"groups","abstract":"
This MP-JWT custom claim is the list of group names that have been assigned to the principal of the MP-JWT. This typically will required a mapping at the application container level to application deployment roles, but a one-to-one between group names and application role names is required to be performed in addition to any other mapping.
","parent_name":"ClaimsMicroProfile"},"Classes/ClaimsMicroProfile.html":{"name":"ClaimsMicroProfile","abstract":"
A class representing the MicroProfile claims as listed in MicroProfile specs.
"},"Classes/ClaimsOpenID.html":{"name":"ClaimsOpenID","abstract":"
A class representing OpenID related claims as decsribed in OpenID specs.
"},"Classes/ClaimsStandardJWT.html":{"name":"ClaimsStandardJWT","abstract":"
A class representing the Standard JWT claims as described in RFC7519.
"},"Classes/JWTEncoder.html":{"name":"JWTEncoder","abstract":"
A thread safe encoder that signs the JWT header and claims using the provided algorithm and encodes a JWT instance as either Data or a JWT String.
"},"Classes/JWTDecoder.html":{"name":"JWTDecoder","abstract":"
A thread safe decoder that decodes either Data or a JWT String as a JWT instance and verifies the signiture using the provided algorithm.
"},"Classes.html":{"name":"Classes","abstract":"
The following classes are available globally.
"},"Protocols.html":{"name":"Protocols","abstract":"
The following protocols are available globally.
"},"Structs.html":{"name":"Structures","abstract":"
The following structures are available globally.
"}}
================================================
FILE: docs/undocumented.json
================================================
{
"warnings": [
],
"source_directory": "/Users/dannys/projects/kitura/Swift-JWT"
}
================================================
FILE: migration.md
================================================
## Upgrading to Swift-JWT 3.0
Swift-JWT version 3.0 adds Codable conformance to JWT's for easier encoding and decoding. This release includes breaking changes to the Swift-JWT API and the following is a guide for converting from Swift-JWT 2.0 to Swift-JWT 3.0
### Header:
The `Header` struct is now Codable and has fixed fields representing the possible headers. As a result, the Header is now intialized by setting the field values:
```swift
// Swift-JWT 2.0
let header = Header([.typ:"JWT", .kid:"KeyID"])
// Swift-JWT 3.0
let header = Header(typ: "JWT", kid: "KeyID")
```
These values can then accessed directly:
```swift
// Swift-JWT 2.0
let keyID = header["kid"]
// Swift-JWT 3.0
let keyID = header.kid
```
### Claims:
The JWT `Claims` has been changed to be a protocol. This means that instead of intializing a fixed `Claims` struct with a `[String: Any]` dictionary, you define and intialize your own object that conforms to claims. Alternatively, you can use one of the [example Claims implementations](https://github.com/Kitura/Swift-JWT/tree/master/Sources/SwiftJWT/ClaimsExamples) provided.
```swift
// Swift-JWT 2.0
let myClaims = Claims(["iss":"Kitura"])
// Swift-JWT 3.0, User defined claims
struct MyClaims: Claims {
let sub: String
}
let myClaims = MyClaims(iss: "Kitura")
// Swift-JWT 3.0, Using Standard Claims
let myClaims = ClaimsStandardJWT(iss: "Kitura")
```
### Algorithm:
The `Algorithm` enum has been removed and replaced with `JWTSigner` and `JWTVerfier` structs. This change removes the requirement to specify the Key type and allows more signing and verifying algorithms to be added later.
```swift
let privateKey = "
".data(using: .utf8)!
let publicKey = "".data(using: .utf8)!
// Swift-JWT 2.0
let signer = Algorithm.rs256(privateKey, .privateKey)
let verifier = Algorithm.rs256(publicKey, .publicKey)
// Swift-JWT 3.0
let signer = JWTSigner.rs256(privateKey: privateKey)
let verifier = JWTVerifier.rs256(publicKey: publicKey)
```
- The `isSupported` function has been removed. To see supported Algorithms, check the [README](https://github.com/Kitura/Swift-JWT#supported-algorithms) or inspect the initialisers for `JWTSigner` and `JWTVerifier`.
### JWT:
- The `JWT` Struct is now generic over a `Claims` object.
```swift
// Swift-JWT 2.0
let myJWT: JWT
// Swift-JWT 3.0
let myJWT: JWT
```
- The `sign` function takes a `JWTSigner` and returns `String` instead of `String?`.
```swift
// Swift-JWT 2.0
let signedJWT: String? = try jwt.sign(using: Algorithm.rs256(key, .privateKey))
// Swift-JWT 3.0
let signedJWT: String = try jwt.sign(using: JWTSigner.rs256(privateKey: key))
```
- The `verify` function takes a `JWTVerifier` and no longer throws.
```swift
// Swift-JWT 2.0
let verified = try JWT.verify(signedJWT, using: Algorithm.rs256(key, .publicKey))
// Swift-JWT 3.0
let verified = JWT.verify(signedJWT, using: JWTVerifier.rs256(publicKey: key))
```
- The `validateClaims` function now only checks the `iat`, `exp`, and `nbf` claims are valid at the current point in time.
```swift
// Swift-JWT 2.0
let validationResult = jwt.validateClaims(issuer: "issuer", audience: "clientID")
// Swift-JWT 3.0
let validationResult = jwt.validateClaims()
let validateOthers = jwt.iss == "issuer" && jwt.aud == "clientID"
```
The `encode()` function has been removed. To encode a JWT without signing it use the `none` JWTSigner:
```swift
// Swift-JWT 2.0
let encodedJWT = try jwt.encoded()
// Swift-JWT 3.0
let encodedJWT = try jwt.sign(using: .none)
```
The `decode()` function has been replaced with an init from String:
```swift
// Swift-JWT 2.0
let decodedJWT = try JWT.decode(encodedJWT)
// Swift-JWT 3.0
let decodedJWT = try JWT(jwtString: encodedJWT)
```
## Removed APIs
As a result of the new API, a number of types are now redundant and have been removed. These include:
- `Supported`
- `Base64URL`
- `Hash`
- `RSAKeyType`
- `ClaimKeys`