@@ -5,11 +5,11 @@ interface OAuthResponse {
55 expires_in : number ;
66 organization_uid : string ;
77 user_uid : string ;
8- token_type : string ,
9- location : string ,
10- region : string ,
11- authorization_type : string ,
12- stack_api_key : string
8+ token_type : string ;
9+ location : string ;
10+ region : string ;
11+ authorization_type : string ;
12+ stack_api_key : string ;
1313}
1414
1515export default class OAuthHandler {
@@ -45,6 +45,60 @@ export default class OAuthHandler {
4545 */
4646 getAccessToken ( ) : string ;
4747
48+ /**
49+ * Get the current refresh token
50+ * @returns The refresh token
51+ */
52+ getRefreshToken ( ) : string ;
53+
54+ /**
55+ * Get the current organization UID
56+ * @returns The organization UID
57+ */
58+ getOrganizationUID ( ) : string ;
59+
60+ /**
61+ * Get the current user UID
62+ * @returns The user UID
63+ */
64+ getUserUID ( ) : string ;
65+
66+ /**
67+ * Get the token expiry time
68+ * @returns The token expiry time
69+ */
70+ getTokenExpiryTime ( ) : string ;
71+
72+ /**
73+ * Set the access token
74+ * @param token - The access token
75+ */
76+ setAccessToken ( token : string ) : void ;
77+
78+ /**
79+ * Set the refresh token
80+ * @param token - The refresh token
81+ */
82+ setRefreshToken ( token : string ) : void ;
83+
84+ /**
85+ * Set organization UID
86+ * @param organizationUID - The organization UID
87+ */
88+ setOrganizationUID ( organizationUID : string ) : void ;
89+
90+ /**
91+ * Set user UID
92+ * @param userUID - The user UID
93+ */
94+ setUserUID ( userUID : string ) : void ;
95+
96+ /**
97+ * Set expiry time
98+ * @param expiryTime - The expiry time
99+ */
100+ setTokenExpiryTime ( expiryTime : Date ) : void ;
101+
48102 /**
49103 * Handle the OAuth redirect URL and exchange the authorization code for a token
50104 * @param url - The redirect URL containing the authorization code
0 commit comments