File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ export interface BaseAuthConfiguration {
2
+ issuer : string ;
3
+ clientId : string ;
4
+ }
5
+ export interface AuthConfiguration extends BaseAuthConfiguration {
6
+ scopes : string [ ] ;
7
+ redirectUrl : string ;
8
+ additionalParameters ?: { [ name : string ] : string } ;
9
+ }
10
+
11
+ export interface RevokeConfiguration {
12
+ clientId : string ;
13
+ issuer : string ;
14
+ }
15
+
16
+ export interface AuthorizeResult {
17
+ accessToken : string ;
18
+ accessTokenExpirationDate : string ;
19
+ additionalParameters ?: { [ name : string ] : string } ;
20
+ idToken : string ;
21
+ refreshToken : string ;
22
+ tokenType : string ;
23
+ }
24
+
25
+ export interface RevokeConfiguration {
26
+ tokenToRevoke : string ;
27
+ sendClientId ?: boolean ;
28
+ }
29
+
30
+ export interface RefreshConfiguration {
31
+ refreshToken : string ;
32
+ }
33
+
34
+ export function authorize ( config : AuthConfiguration ) : Promise < AuthorizeResult > ;
35
+
36
+ export function refresh (
37
+ config : AuthConfiguration ,
38
+ refreshConfig : RefreshConfiguration
39
+ ) : Promise < AuthorizeResult > ;
40
+
41
+ export function revoke (
42
+ config : BaseAuthConfiguration ,
43
+ revokeConfig : RevokeConfiguration
44
+ ) : Promise < void > ;
Original file line number Diff line number Diff line change 3
3
"version" : " 2.0.0" ,
4
4
"description" : " React Native bridge for AppAuth for supporting any OAuth 2 provider" ,
5
5
"main" : " index.js" ,
6
+ "types" : " index.d.ts" ,
6
7
"scripts" : {
7
8
"test" : " jest" ,
8
9
"lint" : " eslint ." ,
12
13
"*.js" : [
13
14
" eslint --fix" ,
14
15
" git add"
16
+ ],
17
+ "*.ts" : [
18
+ " prettier --write" ,
19
+ " git add"
15
20
]
16
21
},
17
22
"files" : [
You can’t perform that action at this time.
0 commit comments