@bity/oauth2-auth-code-pkce
Advanced tools
Comparing version
18
index.js
@@ -83,2 +83,3 @@ "use strict"; | ||
} | ||
ErrorOAuth2.prototype.toString = function () { return 'ErrorOAuth2'; }; | ||
return ErrorOAuth2; | ||
@@ -93,2 +94,3 @@ }()); | ||
} | ||
ErrorUnknown.prototype.toString = function () { return 'ErrorUnknown'; }; | ||
return ErrorUnknown; | ||
@@ -103,2 +105,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorNoAuthCode.prototype.toString = function () { return 'ErrorNoAuthCode'; }; | ||
return ErrorNoAuthCode; | ||
@@ -112,2 +115,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidReturnedStateParam.prototype.toString = function () { return 'ErrorInvalidReturnedStateParam'; }; | ||
return ErrorInvalidReturnedStateParam; | ||
@@ -121,2 +125,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidJson.prototype.toString = function () { return 'ErrorInvalidJson'; }; | ||
return ErrorInvalidJson; | ||
@@ -131,2 +136,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidScope.prototype.toString = function () { return 'ErrorInvalidScope'; }; | ||
return ErrorInvalidScope; | ||
@@ -140,2 +146,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidRequest.prototype.toString = function () { return 'ErrorInvalidRequest'; }; | ||
return ErrorInvalidRequest; | ||
@@ -149,2 +156,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidToken.prototype.toString = function () { return 'ErrorInvalidToken'; }; | ||
return ErrorInvalidToken; | ||
@@ -162,2 +170,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorAuthenticationGrant.prototype.toString = function () { return 'ErrorAuthenticationGrant'; }; | ||
return ErrorAuthenticationGrant; | ||
@@ -171,2 +180,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorUnauthorizedClient.prototype.toString = function () { return 'ErrorUnauthorizedClient'; }; | ||
return ErrorUnauthorizedClient; | ||
@@ -180,2 +190,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorAccessDenied.prototype.toString = function () { return 'ErrorAccessDenied'; }; | ||
return ErrorAccessDenied; | ||
@@ -189,2 +200,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorUnsupportedResponseType.prototype.toString = function () { return 'ErrorUnsupportedResponseType'; }; | ||
return ErrorUnsupportedResponseType; | ||
@@ -198,2 +210,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorServerError.prototype.toString = function () { return 'ErrorServerError'; }; | ||
return ErrorServerError; | ||
@@ -207,2 +220,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorTemporarilyUnavailable.prototype.toString = function () { return 'ErrorTemporarilyUnavailable'; }; | ||
return ErrorTemporarilyUnavailable; | ||
@@ -219,2 +233,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorAccessTokenResponse.prototype.toString = function () { return 'ErrorAccessTokenResponse'; }; | ||
return ErrorAccessTokenResponse; | ||
@@ -228,2 +243,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidClient.prototype.toString = function () { return 'ErrorInvalidClient'; }; | ||
return ErrorInvalidClient; | ||
@@ -237,2 +253,3 @@ }(ErrorAccessTokenResponse)); | ||
} | ||
ErrorInvalidGrant.prototype.toString = function () { return 'ErrorInvalidGrant'; }; | ||
return ErrorInvalidGrant; | ||
@@ -246,2 +263,3 @@ }(ErrorAccessTokenResponse)); | ||
} | ||
ErrorUnsupportedGrantType.prototype.toString = function () { return 'ErrorUnsupportedGrantType'; }; | ||
return ErrorUnsupportedGrantType; | ||
@@ -248,0 +266,0 @@ }(ErrorAccessTokenResponse)); |
36
index.ts
@@ -62,16 +62,16 @@ /** | ||
// To "namespace" all errors. | ||
export class ErrorOAuth2 { } | ||
export class ErrorOAuth2 { toString(): string { return 'ErrorOAuth2'; } } | ||
// For really unknown errors. | ||
export class ErrorUnknown extends ErrorOAuth2 { } | ||
export class ErrorUnknown extends ErrorOAuth2 { toString(): string { return 'ErrorUnknown'; }} | ||
// Some generic, internal errors that can happen. | ||
export class ErrorNoAuthCode extends ErrorOAuth2 { } | ||
export class ErrorInvalidReturnedStateParam extends ErrorOAuth2 { } | ||
export class ErrorInvalidJson extends ErrorOAuth2 { } | ||
export class ErrorNoAuthCode extends ErrorOAuth2 { toString(): string { return 'ErrorNoAuthCode'; }} | ||
export class ErrorInvalidReturnedStateParam extends ErrorOAuth2 { toString(): string { return 'ErrorInvalidReturnedStateParam'; }} | ||
export class ErrorInvalidJson extends ErrorOAuth2 { toString(): string { return 'ErrorInvalidJson'; }} | ||
// Errors that occur across many endpoints | ||
export class ErrorInvalidScope extends ErrorOAuth2 { } | ||
export class ErrorInvalidRequest extends ErrorOAuth2 { } | ||
export class ErrorInvalidToken extends ErrorOAuth2 { } | ||
export class ErrorInvalidScope extends ErrorOAuth2 { toString(): string { return 'ErrorInvalidScope'; }} | ||
export class ErrorInvalidRequest extends ErrorOAuth2 { toString(): string { return 'ErrorInvalidRequest'; }} | ||
export class ErrorInvalidToken extends ErrorOAuth2 { toString(): string { return 'ErrorInvalidToken'; }} | ||
@@ -82,8 +82,8 @@ /** | ||
*/ | ||
export class ErrorAuthenticationGrant extends ErrorOAuth2 { } | ||
export class ErrorUnauthorizedClient extends ErrorAuthenticationGrant { } | ||
export class ErrorAccessDenied extends ErrorAuthenticationGrant { } | ||
export class ErrorUnsupportedResponseType extends ErrorAuthenticationGrant { } | ||
export class ErrorServerError extends ErrorAuthenticationGrant { } | ||
export class ErrorTemporarilyUnavailable extends ErrorAuthenticationGrant { } | ||
export class ErrorAuthenticationGrant extends ErrorOAuth2 { toString(): string { return 'ErrorAuthenticationGrant'; }} | ||
export class ErrorUnauthorizedClient extends ErrorAuthenticationGrant { toString(): string { return 'ErrorUnauthorizedClient'; }} | ||
export class ErrorAccessDenied extends ErrorAuthenticationGrant { toString(): string { return 'ErrorAccessDenied'; }} | ||
export class ErrorUnsupportedResponseType extends ErrorAuthenticationGrant { toString(): string { return 'ErrorUnsupportedResponseType'; }} | ||
export class ErrorServerError extends ErrorAuthenticationGrant { toString(): string { return 'ErrorServerError'; }} | ||
export class ErrorTemporarilyUnavailable extends ErrorAuthenticationGrant { toString(): string { return 'ErrorTemporarilyUnavailable'; }} | ||
@@ -93,6 +93,6 @@ /** | ||
*/ | ||
export class ErrorAccessTokenResponse extends ErrorOAuth2 { } | ||
export class ErrorInvalidClient extends ErrorAccessTokenResponse { } | ||
export class ErrorInvalidGrant extends ErrorAccessTokenResponse { } | ||
export class ErrorUnsupportedGrantType extends ErrorAccessTokenResponse { } | ||
export class ErrorAccessTokenResponse extends ErrorOAuth2 { toString(): string { return 'ErrorAccessTokenResponse'; }} | ||
export class ErrorInvalidClient extends ErrorAccessTokenResponse { toString(): string { return 'ErrorInvalidClient'; }} | ||
export class ErrorInvalidGrant extends ErrorAccessTokenResponse { toString(): string { return 'ErrorInvalidGrant'; }} | ||
export class ErrorUnsupportedGrantType extends ErrorAccessTokenResponse { toString(): string { return 'ErrorUnsupportedGrantType'; }} | ||
@@ -99,0 +99,0 @@ /** |
@@ -84,2 +84,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.OAuth2AuthCodePKCE = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
} | ||
ErrorOAuth2.prototype.toString = function () { return 'ErrorOAuth2'; }; | ||
return ErrorOAuth2; | ||
@@ -94,2 +95,3 @@ }()); | ||
} | ||
ErrorUnknown.prototype.toString = function () { return 'ErrorUnknown'; }; | ||
return ErrorUnknown; | ||
@@ -104,2 +106,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorNoAuthCode.prototype.toString = function () { return 'ErrorNoAuthCode'; }; | ||
return ErrorNoAuthCode; | ||
@@ -113,2 +116,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidReturnedStateParam.prototype.toString = function () { return 'ErrorInvalidReturnedStateParam'; }; | ||
return ErrorInvalidReturnedStateParam; | ||
@@ -122,2 +126,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidJson.prototype.toString = function () { return 'ErrorInvalidJson'; }; | ||
return ErrorInvalidJson; | ||
@@ -132,2 +137,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidScope.prototype.toString = function () { return 'ErrorInvalidScope'; }; | ||
return ErrorInvalidScope; | ||
@@ -141,2 +147,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidRequest.prototype.toString = function () { return 'ErrorInvalidRequest'; }; | ||
return ErrorInvalidRequest; | ||
@@ -150,2 +157,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidToken.prototype.toString = function () { return 'ErrorInvalidToken'; }; | ||
return ErrorInvalidToken; | ||
@@ -163,2 +171,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorAuthenticationGrant.prototype.toString = function () { return 'ErrorAuthenticationGrant'; }; | ||
return ErrorAuthenticationGrant; | ||
@@ -172,2 +181,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorUnauthorizedClient.prototype.toString = function () { return 'ErrorUnauthorizedClient'; }; | ||
return ErrorUnauthorizedClient; | ||
@@ -181,2 +191,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorAccessDenied.prototype.toString = function () { return 'ErrorAccessDenied'; }; | ||
return ErrorAccessDenied; | ||
@@ -190,2 +201,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorUnsupportedResponseType.prototype.toString = function () { return 'ErrorUnsupportedResponseType'; }; | ||
return ErrorUnsupportedResponseType; | ||
@@ -199,2 +211,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorServerError.prototype.toString = function () { return 'ErrorServerError'; }; | ||
return ErrorServerError; | ||
@@ -208,2 +221,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorTemporarilyUnavailable.prototype.toString = function () { return 'ErrorTemporarilyUnavailable'; }; | ||
return ErrorTemporarilyUnavailable; | ||
@@ -220,2 +234,3 @@ }(ErrorAuthenticationGrant)); | ||
} | ||
ErrorAccessTokenResponse.prototype.toString = function () { return 'ErrorAccessTokenResponse'; }; | ||
return ErrorAccessTokenResponse; | ||
@@ -229,2 +244,3 @@ }(ErrorOAuth2)); | ||
} | ||
ErrorInvalidClient.prototype.toString = function () { return 'ErrorInvalidClient'; }; | ||
return ErrorInvalidClient; | ||
@@ -238,2 +254,3 @@ }(ErrorAccessTokenResponse)); | ||
} | ||
ErrorInvalidGrant.prototype.toString = function () { return 'ErrorInvalidGrant'; }; | ||
return ErrorInvalidGrant; | ||
@@ -247,2 +264,3 @@ }(ErrorAccessTokenResponse)); | ||
} | ||
ErrorUnsupportedGrantType.prototype.toString = function () { return 'ErrorUnsupportedGrantType'; }; | ||
return ErrorUnsupportedGrantType; | ||
@@ -249,0 +267,0 @@ }(ErrorAccessTokenResponse)); |
{ | ||
"name": "@bity/oauth2-auth-code-pkce", | ||
"version": "2.11.0", | ||
"version": "2.12.0", | ||
"description": "An OAuth 2.0 client that ONLY supports Authorization Code flow with PKCE support.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
140179
3.18%2240
1.63%