-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
59 lines (52 loc) · 1.72 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import * as ByuJwt from 'byu-jwt'
export = byuOAuth
declare function byuOAuth (clientId: string, clientSecret: string, options?: ByuJwt.Options): Promise<byuOAuth.ByuOAuth>
declare namespace byuOAuth {
export interface ByuOAuth {
getAuthorizationUrl (redirectUri: string, state?: string): Promise<string>,
getClientGrantToken (): Promise<ByuToken>,
getAuthCodeGrantToken (code: string, redirectUri: string): Promise<ByuToken>,
refreshToken (refreshToken: string) : Promise<ByuToken>,
revokeToken (accessToken: string, refreshToken?: string) : Promise<ByuToken>,
authorizationEndpoint: string,
idTokenSigningAlgorithmValuesSupported: Array<string>,
issuer: string,
jwksUri: string,
responseTypesSupported: Array<string>,
revocationEndpoint: string,
scopesSupported: Array<string>,
subjectTypesSupported: Array<string>,
tokenEndpoint: string,
userInfoEndpoint: string
}
export interface ByuToken {
accessToken: string,
expiresAt: Date,
expiresIn: number,
resourceOwner?: ResourceOwner|void,
refreshToken?: string,
scope: string,
type: string
}
export interface ResourceOwner {
atHash: string,
aud: Array<string>,
authTime: number,
azp: string,
byuId: string,
exp: number,
iat: number,
iss: string,
jwt: string,
netId: string,
personId: string,
preferredFirstName: string,
prefix: string,
restOfName: string,
sortName: string,
sub: string,
suffix: string,
surname: string,
surnamePosition: string
}
}