8000 feat: authenticationProviders API endpoints by tommoor · Pull Request #1962 · outline/outline · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: authenticationProviders API endpoints #1962

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

Merged
merged 7 commits into from
Mar 26, 2021

Conversation

tommoor
Copy link
Member
@tommoor tommoor commented Mar 16, 2021

This PR provides the foundation for #1945, allowing the listing and disabling of individual authentication providers.

  • Refactor auth providers into /auth/providers folder (view without whitespace changes)
  • Add authenticationProviders.list endpoint to list auth providers with team status
  • Add authenticationProviders.info endpoint
  • Add authenticationProviders.update endpoint to enable and disable

@tommoor tommoor marked this pull request as ready for review March 25, 2021 04:38
@@ -0,0 +1,52 @@
// @flow
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍖 New API routes


const log = debug("server");
const app = new Koa();
const router = new Router();

router.use(passport.initialize());

// dynamically load available authentication providers
requireDirectory(__dirname).forEach(([{ default: provider, config }]) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were multiple places this require loop happened, now it happens once in ./providers and is imported elsewhere

@@ -0,0 +1,31 @@
// @flow
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍖 Policies for authentication providers

@tommoor tommoor changed the title feat: auth providers management feat: authenticationProviders API endpoints Mar 25, 2021
guard against disabling all auth methods
@tommoor tommoor merged commit e00a437 into main Mar 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the feat/auth-providers-management branch March 26, 2021 18:31
tommoor added a commit that referenced this pull request Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0