PHP 클래스 Psr7Middlewares\Middleware\BasicAuthentication

상속: use trait Psr7Middlewares\Utils\AuthenticationTrait
파일 보기 프로젝트 열기: oscarotero/psr7-middlewares

공개 메소드들

메소드 설명
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
getUsername ( Psr\Http\Message\ServerRequestInterface $request ) : string | null Returns the username.

비공개 메소드들

메소드 설명
checkUserPassword ( string $username, string $password ) : boolean Validate the user and password.
parseAuthorizationHeader ( string $header ) : false | array Parses the authorization header for a basic authentication.

메소드 상세

__invoke() 공개 메소드

Execute the middleware.
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\ServerRequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
리턴 Psr\Http\Message\ResponseInterface

getUsername() 공개 정적인 메소드

Returns the username.
public static getUsername ( Psr\Http\Message\ServerRequestInterface $request ) : string | null
$request Psr\Http\Message\ServerRequestInterface
리턴 string | null