mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
add missing fields for Client interface (#36401)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
a5b79d39aa
commit
0d46dc0bb2
@@ -481,3 +481,22 @@ management.getUsersInRole({id: "role_id", per_page: 8}).then(users => console.lo
|
||||
management.getUsersInRole({id: "role_id", per_page: 8}, (err, data) => console.log(data));
|
||||
management.getUsersInRole({id: "role_id", include_totals: true}).then(userPage => console.log(userPage));
|
||||
management.getUsersInRole({id: "role_id", include_totals: true}, (err, data) => console.log(data));
|
||||
|
||||
management.createClient({
|
||||
name: 'client'
|
||||
});
|
||||
|
||||
management.createClient({
|
||||
name: 'client',
|
||||
grant_types: ['implicit'],
|
||||
jwt_configuration: {
|
||||
lifetime_in_seconds: 300,
|
||||
scopes: {},
|
||||
alg: 'RS256',
|
||||
},
|
||||
encryption_key: {
|
||||
pub: 'pub',
|
||||
cert: 'cert',
|
||||
subject: 'subject',
|
||||
}
|
||||
});
|
||||
Vendored
+23
-2
@@ -174,6 +174,13 @@ export interface PermissionPage extends Page {
|
||||
permissions: Permission[];
|
||||
}
|
||||
|
||||
export type Grant =
|
||||
| 'authorization_code'
|
||||
| 'client_credentials'
|
||||
| 'implicit'
|
||||
| 'password'
|
||||
| 'refresh_token';
|
||||
|
||||
export interface Client {
|
||||
/**
|
||||
* The name of the client.
|
||||
@@ -216,12 +223,26 @@ export interface Client {
|
||||
client_aliases?: string[];
|
||||
allowed_clients?: string[];
|
||||
allowed_logout_urls?: string[];
|
||||
jwt_configuration?: any;
|
||||
jwt_configuration?: {
|
||||
// The amount of time (in seconds) that the token will be valid after being issued
|
||||
lifetime_in_seconds?: number;
|
||||
scopes?: {};
|
||||
// The algorithm used to sign the JsonWebToken
|
||||
alg?: 'HS256' | 'RS256';
|
||||
};
|
||||
/**
|
||||
* A set of grant types that the client is authorized to use
|
||||
*/
|
||||
grant_types?: Grant[];
|
||||
/**
|
||||
* Client signing keys.
|
||||
*/
|
||||
signing_keys?: string[];
|
||||
encryption_key?: any;
|
||||
encryption_key?: {
|
||||
pub?: string;
|
||||
cert?: string;
|
||||
subject?: string;
|
||||
};
|
||||
sso?: boolean;
|
||||
/**
|
||||
* `true` to disable Single Sign On, `false` otherwise (default: `false`)
|
||||
|
||||
Reference in New Issue
Block a user