@spica-devkit/identity 0.9.14 → 0.9.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -1
- package/dist/index.js +3908 -103
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3907 -95
- package/dist/index.mjs.map +1 -1
- package/dist/src/identity.d.ts +4 -2
- package/dist/src/index.d.ts +0 -1
- package/dist/src/interface.d.ts +11 -1
- package/package.json +3 -2
package/dist/src/identity.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import { Identity, IdentityInitialization, ApikeyInitialization, IndexResult, LoginWithStrategyResponse } from "./interface";
|
|
2
|
+
import { Strategy } from "./interface";
|
|
3
3
|
export declare function initialize(options: ApikeyInitialization | IdentityInitialization): void;
|
|
4
4
|
export declare function verifyToken(token: string, baseUrl?: string): Promise<unknown>;
|
|
5
5
|
export declare function login(identifier: string, password: string, tokenLifeSpan?: number): Promise<string>;
|
|
6
|
+
export declare function loginWithStrategy(id: string): Promise<LoginWithStrategyResponse>;
|
|
7
|
+
export declare function getStrategies(): Promise<Strategy[]>;
|
|
6
8
|
export declare function get(id: string): Promise<Identity>;
|
|
7
9
|
export declare function getAll(queryParams?: object): Promise<Identity[] | IndexResult<Identity>>;
|
|
8
10
|
export declare function insert(identity: Identity): Promise<Identity>;
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/interface.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
2
|
export interface Identity {
|
|
3
3
|
_id?: string;
|
|
4
4
|
identifier: string;
|
|
@@ -6,6 +6,16 @@ export interface Identity {
|
|
|
6
6
|
policies?: string[];
|
|
7
7
|
attributes?: object;
|
|
8
8
|
}
|
|
9
|
+
export interface Strategy {
|
|
10
|
+
_id: string;
|
|
11
|
+
type: string;
|
|
12
|
+
name: string;
|
|
13
|
+
title: string;
|
|
14
|
+
}
|
|
15
|
+
export interface LoginWithStrategyResponse {
|
|
16
|
+
url: string;
|
|
17
|
+
token: Observable<string>;
|
|
18
|
+
}
|
|
9
19
|
interface InitializeOptions {
|
|
10
20
|
publicUrl?: string;
|
|
11
21
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spica-devkit/identity",
|
|
3
3
|
"license": "AGPLv3",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.15",
|
|
5
5
|
"description": "Identity package for Spica.",
|
|
6
6
|
"author": "spica",
|
|
7
7
|
"keywords": [
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"typings": "dist/index.d.ts",
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "^0.21.1"
|
|
17
|
+
"axios": "^0.21.1",
|
|
18
|
+
"rxjs": "^6.6.3"
|
|
18
19
|
}
|
|
19
20
|
}
|