-
Notifications
You must be signed in to change notification settings - Fork 1
Add auth provider (TE-320) #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| import {PluginProcessMethod, Plugin} from "../types"; | ||
| import {Plugin, PluginProcessMethod, PluginVerifyMethod} from "../types"; | ||
| import {HttpClient} from "./HttpClient"; | ||
|
|
||
|
|
||
|
||
| export class PluginsManager { | ||
| private isScriptsUploaded = false; | ||
| private userPlugins: Plugin[] = []; | ||
|
|
@@ -122,7 +123,7 @@ export class PluginsManager { | |
| return !!plugin.scriptVerifyEndpoint; | ||
| } | ||
|
|
||
| getVerifyEndpointByID = (id: number): PluginProcessMethod => { | ||
| getVerifyEndpointByID = (id: number): PluginVerifyMethod => { | ||
| const plugin = this.userPlugins.find(one => one.id === id); | ||
| if (!plugin) { | ||
| throw new Error(`Plugin ${id} is not found`); | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||
| import {Task, Events} from "../types"; | ||||||
| import {Task, Events, ProcessMethodOptions, ClaimOptions} from "../types"; | ||||||
| import {PluginsManager} from "./PluginsManager"; | ||||||
| import {EventRegister} from "./EventRegister"; | ||||||
| import {HttpClient} from "./HttpClient"; | ||||||
| import { HttpClient} from "./HttpClient"; | ||||||
|
||||||
| import { HttpClient} from "./HttpClient"; | |
| import {HttpClient} from "./HttpClient"; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,4 +5,5 @@ export * from "./plugin"; | |||||
| export * from "./plugins/custom"; | ||||||
| export * from "./plugins/redirect-timeout"; | ||||||
| export * from "./plugins/action-based"; | ||||||
| export * from "./plugins/interfaces"; | ||||||
| export * from "./plugins/interfaces"; | ||||||
| export * from "./options" | ||||||
|
||||||
| export * from "./options" | |
| export * from "./options"; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||
| export const DefaultAuthProvider = 'telegram'; | ||||||
|
|
||||||
| export type TrackOptions = { | ||||||
| authProvider?: string; | ||||||
| } | ||||||
|
|
||||||
| export type ProcessMethodOptions = { | ||||||
| authProvider?: string; | ||||||
| } | ||||||
|
|
||||||
| export interface ClaimOptions { | ||||||
|
||||||
| export interface ClaimOptions { | |
| export type ClaimOptions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent import formatting: there's an extra space after the opening brace. The import should be
import {HttpClient, TaskFilters} from "./services/HttpClient";to match the style of other imports in this file.