@accounts/client
Advanced tools
Comparing version 0.26.0-alpha.4 to 0.26.0
@@ -1,2 +0,2 @@ | ||
import { Tokens, ImpersonationResult, User, AuthenticationResult } from '@accounts/types'; | ||
import { LoginResult, Tokens, ImpersonationResult, User } from '@accounts/types'; | ||
import { TransportInterface } from './transport-interface'; | ||
@@ -32,3 +32,3 @@ import { AccountsClientOptions } from './types'; | ||
[key: string]: any; | ||
}): Promise<AuthenticationResult>; | ||
}): Promise<LoginResult>; | ||
/** | ||
@@ -61,7 +61,3 @@ * Refresh the user session | ||
logout(): Promise<void>; | ||
mfaChallenge(mfaToken: string, authenticatorId: string): Promise<any>; | ||
mfaAssociate(type: string): Promise<any>; | ||
authenticators(): Promise<import("@accounts/types").Authenticator[]>; | ||
authenticatorsByMfaToken(mfaToken: string): Promise<import("@accounts/types").Authenticator[]>; | ||
private getTokenKey; | ||
} |
@@ -118,8 +118,6 @@ "use strict"; | ||
response = _a.sent(); | ||
if (!('tokens' in response)) return [3 /*break*/, 3]; | ||
return [4 /*yield*/, this.setTokens(response.tokens)]; | ||
case 2: | ||
_a.sent(); | ||
_a.label = 3; | ||
case 3: return [2 /*return*/, response]; | ||
return [2 /*return*/, response]; | ||
} | ||
@@ -266,14 +264,2 @@ }); | ||
}; | ||
AccountsClient.prototype.mfaChallenge = function (mfaToken, authenticatorId) { | ||
return this.transport.mfaChallenge(mfaToken, authenticatorId); | ||
}; | ||
AccountsClient.prototype.mfaAssociate = function (type) { | ||
return this.transport.mfaAssociate(type); | ||
}; | ||
AccountsClient.prototype.authenticators = function () { | ||
return this.transport.authenticators(); | ||
}; | ||
AccountsClient.prototype.authenticatorsByMfaToken = function (mfaToken) { | ||
return this.transport.authenticatorsByMfaToken(mfaToken); | ||
}; | ||
AccountsClient.prototype.getTokenKey = function (tokenName) { | ||
@@ -280,0 +266,0 @@ return this.options.tokenStoragePrefix + ":" + tokenName; |
@@ -1,4 +0,4 @@ | ||
import { AuthenticationResult, ImpersonationResult, CreateUser, User, CreateUserResult, Authenticator, LoginResult } from '@accounts/types'; | ||
import { LoginResult, ImpersonationResult, CreateUser, User, CreateUserResult } from '@accounts/types'; | ||
import { AccountsClient } from './accounts-client'; | ||
export interface TransportInterface extends TransportMfaInterface { | ||
export interface TransportInterface { | ||
client: AccountsClient; | ||
@@ -11,3 +11,3 @@ createUser(user: CreateUser): Promise<CreateUserResult>; | ||
[key: string]: string | object; | ||
}): Promise<AuthenticationResult>; | ||
}): Promise<LoginResult>; | ||
logout(): Promise<void>; | ||
@@ -28,12 +28,1 @@ getUser(): Promise<User>; | ||
} | ||
/** | ||
* MFA related operations | ||
*/ | ||
interface TransportMfaInterface { | ||
authenticators(): Promise<Authenticator[]>; | ||
authenticatorsByMfaToken(mfaToken?: string): Promise<Authenticator[]>; | ||
mfaAssociate(type: string): Promise<any>; | ||
mfaAssociateByMfaToken(mfaToken: string, type: string): Promise<any>; | ||
mfaChallenge(mfaToken: string, authenticatorId: string): Promise<any>; | ||
} | ||
export {}; |
{ | ||
"name": "@accounts/client", | ||
"version": "0.26.0-alpha.4", | ||
"version": "0.26.0", | ||
"description": "Fullstack authentication and accounts-management", | ||
@@ -46,17 +46,17 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@types/jest": "25.1.4", | ||
"@types/jest": "25.2.1", | ||
"@types/jwt-decode": "2.2.1", | ||
"@types/node": "13.9.8", | ||
"jest": "25.1.0", | ||
"jest-localstorage-mock": "2.4.0", | ||
"@types/node": "13.13.5", | ||
"jest": "26.0.1", | ||
"jest-localstorage-mock": "2.4.2", | ||
"jsonwebtoken": "8.5.1", | ||
"localstorage-polyfill": "1.0.1", | ||
"rimraf": "3.0.0" | ||
"rimraf": "3.0.2" | ||
}, | ||
"dependencies": { | ||
"@accounts/types": "^0.26.0-alpha.4", | ||
"@accounts/types": "^0.26.0", | ||
"jwt-decode": "2.2.0", | ||
"tslib": "1.10.0" | ||
"tslib": "1.11.2" | ||
}, | ||
"gitHead": "df64531622ef97718abfe5ed5436873ddf58d164" | ||
"gitHead": "403bd2ea58bc1116c061c5dc1b6e203e20ce2f1b" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26266
417
- Removedtslib@1.10.0(transitive)
Updated@accounts/types@^0.26.0
Updatedtslib@1.11.2