File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) 2015-present, Parse, LLC.
3+ * All rights reserved.
4+ *
5+ * This source code is licensed under the BSD-style license found in the
6+ * LICENSE file in the root directory of this source tree. An additional grant
7+ * of patent rights can be found in the PATENTS file in the same directory.
8+ * @flow
9+ */
10+
11+ /**
12+ * Interface declaration for Authentication Providers
13+ */
14+ export interface AuthProvider {
15+ /**
16+ * Called when _linkWith isn't passed authData.
17+ * Handle your own authentication here.
18+ *
19+ * @params {Object} options.success(provider, authData) or options.error(provider, error) on completion
20+ */
21+ authenticate ( options : any ) : void ,
22+
23+ /**
24+ * (Optional) Called when service is unlinked.
25+ * Handle any cleanup here.
26+ */
27+ deauthenticate ( ) : void ,
28+
29+ /**
30+ * Unique identifier for this Auth Provider.
31+ *
32+ * @return {String } identifier
33+ */
34+ getAuthType ( ) : string ,
35+
36+ /**
37+ * Called when auth data is syncronized.
38+ * Can be used to determine if authData is still valid
39+
40+ * @params {Object} authData Data used when register provider
41+ * @return {Boolean } Indicate if service should continue to be linked
42+ */
43+ restoreAuthentication ( authData : any ) : boolean ,
44+ }
You can’t perform that action at this time.
0 commit comments