Skip to content

add route named login if not exists #10

@jpuck

Description

@jpuck

By convention, laravel assumes a route named login exists to redirect unauthenticated requests.

This package names its route shibboleth-login because it's designed to work alongside other authentication providers, such as the default scaffolding provided by artisan. But if this is the only authentication provider, then that name will need to be manually declared. e.g.

Route::name('login')->get('/login', '\\'.Route::getRoutes()->getByName('shibboleth-login')->getActionName());

or more readable, but with a redirect:

Route::redirect('/login', '/shibboleth-login')->name('login');

One solution to this problem could be to declare the route named login if it doesn't already exist. However, this might get tricky with route loading and precedence order.

Another possible solution would be to allow a configuration to rename the routes.

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