Skip to content

Reduce authentication SoT #147

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions