Skip to content

Reduce authentication SoT #147

@yamcodes

Description

@yamcodes

Clear and concise description of the problem

Today we define authentication in swagger:

          detail: {
            summary: 'Create Article',
            security: [
              {
                tokenAuth: [],
              },
            ],
          },

and runtime:

          beforeHandle: app.store.authService.requireLogin,

This is done for each endpoint individually.

Suggested solution

What if there was a way to reduce the SoTs and lean on ElysiaJS Grouping ? Or at the very least, create a utility to provide both the detail and the beforeHandle to the plugin hook at the same time.

Alternative

No response

Additional context

Continued from here: #145 (comment)

Validations

  • Read the Contributing Guide.
  • Read the README.md.
  • Check that there isn't already an issue that requests the same feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    conduitThis PR/issue is about the Conduit Bedstack RealWorld example app.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions