chore: Add authentication interface and adjust authentication classes

This commit is contained in:
Faruk AYDIN
2022-03-01 15:14:56 +03:00
committed by Ali BARIN
parent a506d1985f
commit b2369fa8cd
14 changed files with 144 additions and 93 deletions

View File

@@ -1,13 +1,16 @@
import AuthenticationInterface from '../../types/interfaces/authentication-interface';
import FlickrApi from 'flickr-sdk';
import AppInfo from '../../types/app-info';
import Field from '../../types/field';
import JSONObject from '../../types/interfaces/json-object';
export default class Authentication {
appData: any;
connectionData: any;
client: any;
oauthClient: any;
export default class Authentication implements AuthenticationInterface {
appData: AppInfo;
connectionData: JSONObject;
client: typeof FlickrApi;
oauthClient: typeof FlickrApi;
constructor(appData: any, connectionData: any) {
constructor(appData: AppInfo, connectionData: JSONObject) {
this.oauthClient = new FlickrApi.OAuth(
connectionData.consumerKey,
connectionData.consumerSecret