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 33 "version" : " 2.0.0" ,
44 "description" : " React Native bridge for AppAuth for supporting any OAuth 2 provider" ,
55 "main" : " index.js" ,
6+ "types" : " index.d.ts" ,
67 "scripts" : {
78 "test" : " jest" ,
89 "lint" : " eslint ." ,
1213 "*.js" : [
1314 " eslint --fix" ,
1415 " git add"
16+ ],
17+ "*.ts" : [
18+ " prettier --write" ,
19+ " git add"
1520 ]
1621 },
1722 "files" : [
You can’t perform that action at this time.
0 commit comments