Skip to content

Commit 6dbd7d0

Browse files
committed
Move interface to documented class
1 parent f37a772 commit 6dbd7d0

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

src/authorize.ts

+18-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {localStorageAvailable, globalContext, toBase64} from './util';
44
import UnauthorizedError from './unauthorized-error';
55
import { EventHandler } from './interfaces/event_handling';
66
import {requestWithTimeout} from "./requests";
7-
import {AuthorizeOptions} from "./interfaces/authorize_options";
87
import {Remote} from "./remote";
98

109

@@ -26,6 +25,24 @@ interface InAppBrowserEvent extends Event {
2625
data?: string;
2726
}
2827

28+
export interface AuthorizeOptions {
29+
/** URL of the authorization endpoint */
30+
authURL: string;
31+
/** access scope */
32+
scope?: string;
33+
redirectUri?: string;
34+
/**
35+
* client identifier
36+
* @defaultValue Origin of the redirectUri
37+
* */
38+
clientId?: string;
39+
response_type?: 'token' | 'code';
40+
state?: string;
41+
code_challenge?: string;
42+
code_challenge_method?: 'S256' | 'plain';
43+
token_access_type?: 'online' | 'offline'; // Dropbox only
44+
}
45+
2946
// This is set in _rs_init and needed for removal in _rs_cleanup
3047
let onFeaturesLoaded: EventHandler;
3148

src/interfaces/authorize_options.ts

-12
This file was deleted.

src/remotestorage.ts

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import UnauthorizedError from './unauthorized-error';
2727
import Features from './features';
2828
import {Remote} from "./remote";
2929

30+
import type { AuthorizeOptions } from './authorize';
31+
3032
// TODO this is assigned to RemoteStorage.util later; check if still needed
3133
import * as util from './util';
3234
import {AuthorizeOptions} from "./interfaces/authorize_options";

0 commit comments

Comments
 (0)