tkhamez/slim-role-auth

View on GitHub
RoleAuth/RoleProviderInterface.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

namespace Tkhamez\Slim\RoleAuth;

use Psr\Http\Message\ServerRequestInterface;

interface RoleProviderInterface
{
    /**
     * Returns roles from an authenticated user.
     *
     * Example: ['role.one', 'role.two']
     *
     * @param ServerRequestInterface $request
     * @return string[]
     */
    public function getRoles(ServerRequestInterface $request): array;
}