diff --git a/index.html b/index.html index f74594b..b21f728 100644 --- a/index.html +++ b/index.html @@ -82,17 +82,6 @@ - -
-
- -
-
- API Tools
- Build RESTful APIs in Minutes -
-
-
@@ -217,7 +206,7 @@

Search - GitHub + GitHub

@@ -392,7 +381,7 @@
Laminas
  • Laminas Project The new foundation for the community-supported, open source continuation of Zend Framework
  • Laminas Components and MVC Components and MVC for enterprise applications
  • Mezzio PSR-15 middleware in minutes
  • -
  • Laminas API Tools Build RESTful APIs in minutes
  • +
  • Maintenance Overview Current maintenance status of Laminas & Mezzio packages
  • @@ -409,13 +398,13 @@
  • - +
  • - +
  • - +
  • @@ -488,6 +477,6 @@ diff --git a/intro/index.html b/intro/index.html index be89986..1176271 100644 --- a/intro/index.html +++ b/intro/index.html @@ -1,14 +1,15 @@ - - + + - - + + Redirecting... + + + + - - + +Redirecting... + diff --git a/pages/404.html b/pages/404.html index 1555154..f5a35a3 100644 --- a/pages/404.html +++ b/pages/404.html @@ -82,17 +82,6 @@ - -
    -
    - -
    -
    - API Tools
    - Build RESTful APIs in Minutes -
    -
    -
    @@ -217,7 +206,7 @@

    Search - GitHub + GitHub

    @@ -345,7 +334,7 @@
    Laminas
  • Laminas Project The new foundation for the community-supported, open source continuation of Zend Framework
  • Laminas Components and MVC Components and MVC for enterprise applications
  • Mezzio PSR-15 middleware in minutes
  • -
  • Laminas API Tools Build RESTful APIs in minutes
  • +
  • Maintenance Overview Current maintenance status of Laminas & Mezzio packages
  • @@ -362,13 +351,13 @@
  • - +
  • - +
  • - +
  • diff --git a/search/search_index.json b/search/search_index.json index 833a181..1003ec0 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"mezzio-authentication-basic πŸ‡·πŸ‡Ί Русским Π³Ρ€Π°ΠΆΠ΄Π°Π½Π°ΠΌ ΠœΡ‹, участники Laminas, Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ ΠΈ ΠΆΠΈΠ²Π΅ΠΌ Π² Ρ€Π°Π·Π½Ρ‹Ρ… странах. Π£ ΠΌΠ½ΠΎΠ³ΠΈΡ… ΠΈΠ· нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, родствСнники ΠΈ ΠΊΠΎΠ»Π»Π΅Π³ΠΈ ΠΊΠ°ΠΊ Π² России, Ρ‚Π°ΠΊ ΠΈ Π² Π£ΠΊΡ€Π°ΠΈΠ½Π΅. НСкоторыС ΠΈΠ· нас Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ Π² России. НСкоторыС ΠΈΠ· нас ΠΆΠΈΠ²ΡƒΡ‚ Π² России. Π£ Π½Π΅ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… Π±Π°Π±ΡƒΡˆΠΊΠΈ ΠΈ Π΄Π΅Π΄ΡƒΡˆΠΊΠΈ ΡΡ€Π°ΠΆΠ°Π»ΠΈΡΡŒ с Ρ„Π°ΡˆΠΈΡΡ‚Π°ΠΌΠΈ Π²ΠΎ Π’Ρ‚ΠΎΡ€ΠΎΠΉ ΠΌΠΈΡ€ΠΎΠ²ΠΎΠΉ Π²ΠΎΠΉΠ½Π΅. Π—Π΄Π΅ΡΡŒ Π½ΠΈΠΊΡ‚ΠΎ Π½Π΅ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ Ρ„Π°ΡˆΠΈΠ·ΠΌ. Π£ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΈΠ· нас Π΅ΡΡ‚ΡŒ украинская родствСнница, которая спаслась ΠΈΠ· Π΄ΠΎΠΌΠ° вмСстС с сыном. ПоСзд задСрТался ΠΈΠ·-Π·Π° Π±ΠΎΠΌΠ±Π΅ΠΆΠΊΠΈ Π½Π° Π΄ΠΎΡ€ΠΎΠ³Π΅ Π²ΠΏΠ΅Ρ€Π΅Π΄ΠΈ. Π£ нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ прячутся Π² Π±ΠΎΠΌΠ±ΠΎΡƒΠ±Π΅ΠΆΠΈΡ‰Π°Ρ…. ΠœΡ‹ с Ρ‚Ρ€Π΅Π²ΠΎΠ³ΠΎΠΉ ΠΆΠ΄Π΅ΠΌ вСсточки ΠΎΡ‚ Π½ΠΈΡ… послС Π²ΠΎΠ·Π΄ΡƒΡˆΠ½Ρ‹Ρ… Π½Π°Π»Π΅Ρ‚ΠΎΠ², ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ бСспорядочно наносят ΡƒΠ΄Π°Ρ€Ρ‹ ΠΈ ΠΏΠΎΠΏΠ°Π΄Π°ΡŽΡ‚ ΠΏΠΎ Π±ΠΎΠ»ΡŒΠ½ΠΈΡ†Π°ΠΌ, школам, дСтским садам ΠΈ Π΄ΠΎΠΌΠ°ΠΌ. ΠœΡ‹ Π½Π΅ Π±Π΅Ρ€Π΅ΠΌ это ΠΈΠ· ΠΊΠ°ΠΊΠΈΡ…-Π»ΠΈΠ±ΠΎ БМИ. ΠœΡ‹ наблюдаСм это Π½Π°ΠΏΡ€ΡΠΌΡƒΡŽ. Π’Ρ‹ довСряСтС Π½Π°ΠΌ достаточно, Ρ‡Ρ‚ΠΎΠ± ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ наши ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹, ΠΈ ΠΌΡ‹ просим вас Π΄ΠΎΠ²Π΅Ρ€ΠΈΡ‚ΡŒΡΡ Π½Π°ΠΌ вновь. ΠœΡ‹ нуТдаСмся Π² ΠΏΠΎΠΌΠΎΡ‰ΠΈ. Π’Ρ‹Ρ…ΠΎΠ΄ΠΈΡ‚Π΅ ΠΈ протСстуйтС ΠΏΡ€ΠΎΡ‚ΠΈΠ² этой бСсполСзной Π²ΠΎΠΉΠ½Ρ‹. ΠžΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚Π΅ ΠΊΡ€ΠΎΠ²ΠΎΠΏΡ€ΠΎΠ»ΠΈΡ‚ΠΈΠ΅. Π‘ΠΊΠ°ΠΆΠΈΡ‚Π΅ \"НСт Π²ΠΎΠΉΠ½Π΅!\" πŸ‡ΊπŸ‡Έ To Citizens of Russia We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism. One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences. You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say \"stop the war!\" This library provides an HTTP Basic authentication adapter for mezzio-authentication , and thus PSR-7 middleware applications. Installation Run the following to install this library: $ composer require mezzio/mezzio-authentication-basic Documentation Documentation is in the doc tree , and can be compiled using mkdocs : $ mkdocs build You may also browse the documentation online .","title":"Home"},{"location":"#mezzio-authentication-basic","text":"","title":"mezzio-authentication-basic"},{"location":"#_1","text":"ΠœΡ‹, участники Laminas, Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ ΠΈ ΠΆΠΈΠ²Π΅ΠΌ Π² Ρ€Π°Π·Π½Ρ‹Ρ… странах. Π£ ΠΌΠ½ΠΎΠ³ΠΈΡ… ΠΈΠ· нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, родствСнники ΠΈ ΠΊΠΎΠ»Π»Π΅Π³ΠΈ ΠΊΠ°ΠΊ Π² России, Ρ‚Π°ΠΊ ΠΈ Π² Π£ΠΊΡ€Π°ΠΈΠ½Π΅. НСкоторыС ΠΈΠ· нас Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ Π² России. НСкоторыС ΠΈΠ· нас ΠΆΠΈΠ²ΡƒΡ‚ Π² России. Π£ Π½Π΅ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… Π±Π°Π±ΡƒΡˆΠΊΠΈ ΠΈ Π΄Π΅Π΄ΡƒΡˆΠΊΠΈ ΡΡ€Π°ΠΆΠ°Π»ΠΈΡΡŒ с Ρ„Π°ΡˆΠΈΡΡ‚Π°ΠΌΠΈ Π²ΠΎ Π’Ρ‚ΠΎΡ€ΠΎΠΉ ΠΌΠΈΡ€ΠΎΠ²ΠΎΠΉ Π²ΠΎΠΉΠ½Π΅. Π—Π΄Π΅ΡΡŒ Π½ΠΈΠΊΡ‚ΠΎ Π½Π΅ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ Ρ„Π°ΡˆΠΈΠ·ΠΌ. Π£ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΈΠ· нас Π΅ΡΡ‚ΡŒ украинская родствСнница, которая спаслась ΠΈΠ· Π΄ΠΎΠΌΠ° вмСстС с сыном. ПоСзд задСрТался ΠΈΠ·-Π·Π° Π±ΠΎΠΌΠ±Π΅ΠΆΠΊΠΈ Π½Π° Π΄ΠΎΡ€ΠΎΠ³Π΅ Π²ΠΏΠ΅Ρ€Π΅Π΄ΠΈ. Π£ нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ прячутся Π² Π±ΠΎΠΌΠ±ΠΎΡƒΠ±Π΅ΠΆΠΈΡ‰Π°Ρ…. ΠœΡ‹ с Ρ‚Ρ€Π΅Π²ΠΎΠ³ΠΎΠΉ ΠΆΠ΄Π΅ΠΌ вСсточки ΠΎΡ‚ Π½ΠΈΡ… послС Π²ΠΎΠ·Π΄ΡƒΡˆΠ½Ρ‹Ρ… Π½Π°Π»Π΅Ρ‚ΠΎΠ², ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ бСспорядочно наносят ΡƒΠ΄Π°Ρ€Ρ‹ ΠΈ ΠΏΠΎΠΏΠ°Π΄Π°ΡŽΡ‚ ΠΏΠΎ Π±ΠΎΠ»ΡŒΠ½ΠΈΡ†Π°ΠΌ, школам, дСтским садам ΠΈ Π΄ΠΎΠΌΠ°ΠΌ. ΠœΡ‹ Π½Π΅ Π±Π΅Ρ€Π΅ΠΌ это ΠΈΠ· ΠΊΠ°ΠΊΠΈΡ…-Π»ΠΈΠ±ΠΎ БМИ. ΠœΡ‹ наблюдаСм это Π½Π°ΠΏΡ€ΡΠΌΡƒΡŽ. Π’Ρ‹ довСряСтС Π½Π°ΠΌ достаточно, Ρ‡Ρ‚ΠΎΠ± ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ наши ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹, ΠΈ ΠΌΡ‹ просим вас Π΄ΠΎΠ²Π΅Ρ€ΠΈΡ‚ΡŒΡΡ Π½Π°ΠΌ вновь. ΠœΡ‹ нуТдаСмся Π² ΠΏΠΎΠΌΠΎΡ‰ΠΈ. Π’Ρ‹Ρ…ΠΎΠ΄ΠΈΡ‚Π΅ ΠΈ протСстуйтС ΠΏΡ€ΠΎΡ‚ΠΈΠ² этой бСсполСзной Π²ΠΎΠΉΠ½Ρ‹. ΠžΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚Π΅ ΠΊΡ€ΠΎΠ²ΠΎΠΏΡ€ΠΎΠ»ΠΈΡ‚ΠΈΠ΅. Π‘ΠΊΠ°ΠΆΠΈΡ‚Π΅ \"НСт Π²ΠΎΠΉΠ½Π΅!\"","title":"πŸ‡·πŸ‡Ί Русским Π³Ρ€Π°ΠΆΠ΄Π°Π½Π°ΠΌ"},{"location":"#to-citizens-of-russia","text":"We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism. One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences. You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say \"stop the war!\" This library provides an HTTP Basic authentication adapter for mezzio-authentication , and thus PSR-7 middleware applications.","title":"πŸ‡ΊπŸ‡Έ To Citizens of Russia"},{"location":"#installation","text":"Run the following to install this library: $ composer require mezzio/mezzio-authentication-basic","title":"Installation"},{"location":"#documentation","text":"Documentation is in the doc tree , and can be compiled using mkdocs : $ mkdocs build You may also browse the documentation online .","title":"Documentation"},{"location":"intro/","text":"document.addEventListener(\"DOMContentLoaded\", function (event) { window.location.pathname = '/mezzio-authentication-basic/v1/intro/'; });","title":"_intro"},{"location":"v1/config/","text":"Configuration To use the adapter, you will need to provide the following configuration: A valid mezzio-authentication UserRepositoryInterface service in your DI container. This service will perform the actual work of validating the supplied credentials. An HTTP Basic realm . This may be an arbitrary value, but is required by the specification . A response factory. If you are using Mezzio, this is already configured for you. As an example of configuration: // config/autoload/authentication.global.php use Mezzio\\Authentication\\AuthenticationInterface; use Mezzio\\Authentication\\Basic\\BasicAccess; use Mezzio\\Authentication\\UserRepositoryInterface; use Mezzio\\Authentication\\UserRepository\\PdoDatabase; return [ 'dependencies' => [ 'aliases' => [ // Use the default PdoDatabase user repository. This assumes // you have configured that service correctly. UserRepositoryInterface::class => PdoDatabase::class, // Tell mezzio-authentication to use the BasicAccess // adapter: AuthenticationInterface::class => BasicAccess::class, ], ], 'authentication' => [ 'realm' => 'api', ], ];","title":"Configuration"},{"location":"v1/config/#configuration","text":"To use the adapter, you will need to provide the following configuration: A valid mezzio-authentication UserRepositoryInterface service in your DI container. This service will perform the actual work of validating the supplied credentials. An HTTP Basic realm . This may be an arbitrary value, but is required by the specification . A response factory. If you are using Mezzio, this is already configured for you. As an example of configuration: // config/autoload/authentication.global.php use Mezzio\\Authentication\\AuthenticationInterface; use Mezzio\\Authentication\\Basic\\BasicAccess; use Mezzio\\Authentication\\UserRepositoryInterface; use Mezzio\\Authentication\\UserRepository\\PdoDatabase; return [ 'dependencies' => [ 'aliases' => [ // Use the default PdoDatabase user repository. This assumes // you have configured that service correctly. UserRepositoryInterface::class => PdoDatabase::class, // Tell mezzio-authentication to use the BasicAccess // adapter: AuthenticationInterface::class => BasicAccess::class, ], ], 'authentication' => [ 'realm' => 'api', ], ];","title":"Configuration"},{"location":"v1/intro/","text":"Introduction This component provides an HTTP Basic Authentication adapter for mezzio-authentication . HTTP Basic authentication utilizes the user-info section of the URL authority in order to provide credentials. While the HTTP specifications allow a single value for the user-info, most implementations require a : -separated credential, with the username first, and the password second; in fact, this is how browsers always send HTTP Basic credentials, as their prompts are always for the two values. As such, this implementation expects both a username and password in the supplied credentials . Only use in trusted networks Since HTTP Basic transmits the credentials via the URL, it should only be used within trusted networks, and never in public-facing sites, as the URL can be sniffed by MITM proxies.","title":"Introduction"},{"location":"v1/intro/#introduction","text":"This component provides an HTTP Basic Authentication adapter for mezzio-authentication . HTTP Basic authentication utilizes the user-info section of the URL authority in order to provide credentials. While the HTTP specifications allow a single value for the user-info, most implementations require a : -separated credential, with the username first, and the password second; in fact, this is how browsers always send HTTP Basic credentials, as their prompts are always for the two values. As such, this implementation expects both a username and password in the supplied credentials .","title":"Introduction"},{"location":"v1/intro/#only-use-in-trusted-networks","text":"Since HTTP Basic transmits the credentials via the URL, it should only be used within trusted networks, and never in public-facing sites, as the URL can be sniffed by MITM proxies.","title":"Only use in trusted networks"},{"location":"v1/usage/","text":"Usage Whenever you need an authenticated user, you can place the mezzio-authentication AuthenticationMiddleware in your pipeline. Globally If you need all routes to use authentication, add it globally. // In config/pipeline.php, within the callback: $app->pipe(Mezzio\\Authentication\\AuthenticationMiddleware::class); For an entire sub-path If you need all routes that begin with a particular sub-path to require authentication, use path-segregation : // In config/pipeline.php. // In the import statements: use Mezzio\\Authentication\\AuthenticationMiddleware; // In the callback: $app->pipe('/api', AuthenticationMiddleware::class); For a specific route If you want to restrict access for a specific route, create a route-specific middleware pipeline : // In config/routes.php, in the callback: $app->get( '/path/requiring/authentication', [ Mezzio\\Authentication\\AuthenticationMiddleware::class, HandlerRequiringAuthentication::class, // use your own handler here ] );","title":"Usage"},{"location":"v1/usage/#usage","text":"Whenever you need an authenticated user, you can place the mezzio-authentication AuthenticationMiddleware in your pipeline.","title":"Usage"},{"location":"v1/usage/#globally","text":"If you need all routes to use authentication, add it globally. // In config/pipeline.php, within the callback: $app->pipe(Mezzio\\Authentication\\AuthenticationMiddleware::class);","title":"Globally"},{"location":"v1/usage/#for-an-entire-sub-path","text":"If you need all routes that begin with a particular sub-path to require authentication, use path-segregation : // In config/pipeline.php. // In the import statements: use Mezzio\\Authentication\\AuthenticationMiddleware; // In the callback: $app->pipe('/api', AuthenticationMiddleware::class);","title":"For an entire sub-path"},{"location":"v1/usage/#for-a-specific-route","text":"If you want to restrict access for a specific route, create a route-specific middleware pipeline : // In config/routes.php, in the callback: $app->get( '/path/requiring/authentication', [ Mezzio\\Authentication\\AuthenticationMiddleware::class, HandlerRequiringAuthentication::class, // use your own handler here ] );","title":"For a specific route"}]} \ No newline at end of file +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"mezzio-authentication-basic πŸ‡·πŸ‡Ί Русским Π³Ρ€Π°ΠΆΠ΄Π°Π½Π°ΠΌ ΠœΡ‹, участники Laminas, Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ ΠΈ ΠΆΠΈΠ²Π΅ΠΌ Π² Ρ€Π°Π·Π½Ρ‹Ρ… странах. Π£ ΠΌΠ½ΠΎΠ³ΠΈΡ… ΠΈΠ· нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, родствСнники ΠΈ ΠΊΠΎΠ»Π»Π΅Π³ΠΈ ΠΊΠ°ΠΊ Π² России, Ρ‚Π°ΠΊ ΠΈ Π² Π£ΠΊΡ€Π°ΠΈΠ½Π΅. НСкоторыС ΠΈΠ· нас Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ Π² России. НСкоторыС ΠΈΠ· нас ΠΆΠΈΠ²ΡƒΡ‚ Π² России. Π£ Π½Π΅ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… Π±Π°Π±ΡƒΡˆΠΊΠΈ ΠΈ Π΄Π΅Π΄ΡƒΡˆΠΊΠΈ ΡΡ€Π°ΠΆΠ°Π»ΠΈΡΡŒ с Ρ„Π°ΡˆΠΈΡΡ‚Π°ΠΌΠΈ Π²ΠΎ Π’Ρ‚ΠΎΡ€ΠΎΠΉ ΠΌΠΈΡ€ΠΎΠ²ΠΎΠΉ Π²ΠΎΠΉΠ½Π΅. Π—Π΄Π΅ΡΡŒ Π½ΠΈΠΊΡ‚ΠΎ Π½Π΅ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ Ρ„Π°ΡˆΠΈΠ·ΠΌ. Π£ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΈΠ· нас Π΅ΡΡ‚ΡŒ украинская родствСнница, которая спаслась ΠΈΠ· Π΄ΠΎΠΌΠ° вмСстС с сыном. ПоСзд задСрТался ΠΈΠ·-Π·Π° Π±ΠΎΠΌΠ±Π΅ΠΆΠΊΠΈ Π½Π° Π΄ΠΎΡ€ΠΎΠ³Π΅ Π²ΠΏΠ΅Ρ€Π΅Π΄ΠΈ. Π£ нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ прячутся Π² Π±ΠΎΠΌΠ±ΠΎΡƒΠ±Π΅ΠΆΠΈΡ‰Π°Ρ…. ΠœΡ‹ с Ρ‚Ρ€Π΅Π²ΠΎΠ³ΠΎΠΉ ΠΆΠ΄Π΅ΠΌ вСсточки ΠΎΡ‚ Π½ΠΈΡ… послС Π²ΠΎΠ·Π΄ΡƒΡˆΠ½Ρ‹Ρ… Π½Π°Π»Π΅Ρ‚ΠΎΠ², ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ бСспорядочно наносят ΡƒΠ΄Π°Ρ€Ρ‹ ΠΈ ΠΏΠΎΠΏΠ°Π΄Π°ΡŽΡ‚ ΠΏΠΎ Π±ΠΎΠ»ΡŒΠ½ΠΈΡ†Π°ΠΌ, школам, дСтским садам ΠΈ Π΄ΠΎΠΌΠ°ΠΌ. ΠœΡ‹ Π½Π΅ Π±Π΅Ρ€Π΅ΠΌ это ΠΈΠ· ΠΊΠ°ΠΊΠΈΡ…-Π»ΠΈΠ±ΠΎ БМИ. ΠœΡ‹ наблюдаСм это Π½Π°ΠΏΡ€ΡΠΌΡƒΡŽ. Π’Ρ‹ довСряСтС Π½Π°ΠΌ достаточно, Ρ‡Ρ‚ΠΎΠ± ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ наши ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹, ΠΈ ΠΌΡ‹ просим вас Π΄ΠΎΠ²Π΅Ρ€ΠΈΡ‚ΡŒΡΡ Π½Π°ΠΌ вновь. ΠœΡ‹ нуТдаСмся Π² ΠΏΠΎΠΌΠΎΡ‰ΠΈ. Π’Ρ‹Ρ…ΠΎΠ΄ΠΈΡ‚Π΅ ΠΈ протСстуйтС ΠΏΡ€ΠΎΡ‚ΠΈΠ² этой бСсполСзной Π²ΠΎΠΉΠ½Ρ‹. ΠžΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚Π΅ ΠΊΡ€ΠΎΠ²ΠΎΠΏΡ€ΠΎΠ»ΠΈΡ‚ΠΈΠ΅. Π‘ΠΊΠ°ΠΆΠΈΡ‚Π΅ \"НСт Π²ΠΎΠΉΠ½Π΅!\" πŸ‡ΊπŸ‡Έ To Citizens of Russia We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism. One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences. You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say \"stop the war!\" This library provides an HTTP Basic authentication adapter for mezzio-authentication , and thus PSR-7 middleware applications. Installation Run the following to install this library: $ composer require mezzio/mezzio-authentication-basic Documentation Documentation is in the doc tree , and can be compiled using mkdocs : $ mkdocs build You may also browse the documentation online .","title":"Home"},{"location":"#mezzio-authentication-basic","text":"","title":"mezzio-authentication-basic"},{"location":"#_1","text":"ΠœΡ‹, участники Laminas, Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ ΠΈ ΠΆΠΈΠ²Π΅ΠΌ Π² Ρ€Π°Π·Π½Ρ‹Ρ… странах. Π£ ΠΌΠ½ΠΎΠ³ΠΈΡ… ΠΈΠ· нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, родствСнники ΠΈ ΠΊΠΎΠ»Π»Π΅Π³ΠΈ ΠΊΠ°ΠΊ Π² России, Ρ‚Π°ΠΊ ΠΈ Π² Π£ΠΊΡ€Π°ΠΈΠ½Π΅. НСкоторыС ΠΈΠ· нас Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ Π² России. НСкоторыС ΠΈΠ· нас ΠΆΠΈΠ²ΡƒΡ‚ Π² России. Π£ Π½Π΅ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… Π±Π°Π±ΡƒΡˆΠΊΠΈ ΠΈ Π΄Π΅Π΄ΡƒΡˆΠΊΠΈ ΡΡ€Π°ΠΆΠ°Π»ΠΈΡΡŒ с Ρ„Π°ΡˆΠΈΡΡ‚Π°ΠΌΠΈ Π²ΠΎ Π’Ρ‚ΠΎΡ€ΠΎΠΉ ΠΌΠΈΡ€ΠΎΠ²ΠΎΠΉ Π²ΠΎΠΉΠ½Π΅. Π—Π΄Π΅ΡΡŒ Π½ΠΈΠΊΡ‚ΠΎ Π½Π΅ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ Ρ„Π°ΡˆΠΈΠ·ΠΌ. Π£ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΈΠ· нас Π΅ΡΡ‚ΡŒ украинская родствСнница, которая спаслась ΠΈΠ· Π΄ΠΎΠΌΠ° вмСстС с сыном. ПоСзд задСрТался ΠΈΠ·-Π·Π° Π±ΠΎΠΌΠ±Π΅ΠΆΠΊΠΈ Π½Π° Π΄ΠΎΡ€ΠΎΠ³Π΅ Π²ΠΏΠ΅Ρ€Π΅Π΄ΠΈ. Π£ нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ прячутся Π² Π±ΠΎΠΌΠ±ΠΎΡƒΠ±Π΅ΠΆΠΈΡ‰Π°Ρ…. ΠœΡ‹ с Ρ‚Ρ€Π΅Π²ΠΎΠ³ΠΎΠΉ ΠΆΠ΄Π΅ΠΌ вСсточки ΠΎΡ‚ Π½ΠΈΡ… послС Π²ΠΎΠ·Π΄ΡƒΡˆΠ½Ρ‹Ρ… Π½Π°Π»Π΅Ρ‚ΠΎΠ², ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ бСспорядочно наносят ΡƒΠ΄Π°Ρ€Ρ‹ ΠΈ ΠΏΠΎΠΏΠ°Π΄Π°ΡŽΡ‚ ΠΏΠΎ Π±ΠΎΠ»ΡŒΠ½ΠΈΡ†Π°ΠΌ, школам, дСтским садам ΠΈ Π΄ΠΎΠΌΠ°ΠΌ. ΠœΡ‹ Π½Π΅ Π±Π΅Ρ€Π΅ΠΌ это ΠΈΠ· ΠΊΠ°ΠΊΠΈΡ…-Π»ΠΈΠ±ΠΎ БМИ. ΠœΡ‹ наблюдаСм это Π½Π°ΠΏΡ€ΡΠΌΡƒΡŽ. Π’Ρ‹ довСряСтС Π½Π°ΠΌ достаточно, Ρ‡Ρ‚ΠΎΠ± ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ наши ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹, ΠΈ ΠΌΡ‹ просим вас Π΄ΠΎΠ²Π΅Ρ€ΠΈΡ‚ΡŒΡΡ Π½Π°ΠΌ вновь. ΠœΡ‹ нуТдаСмся Π² ΠΏΠΎΠΌΠΎΡ‰ΠΈ. Π’Ρ‹Ρ…ΠΎΠ΄ΠΈΡ‚Π΅ ΠΈ протСстуйтС ΠΏΡ€ΠΎΡ‚ΠΈΠ² этой бСсполСзной Π²ΠΎΠΉΠ½Ρ‹. ΠžΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚Π΅ ΠΊΡ€ΠΎΠ²ΠΎΠΏΡ€ΠΎΠ»ΠΈΡ‚ΠΈΠ΅. Π‘ΠΊΠ°ΠΆΠΈΡ‚Π΅ \"НСт Π²ΠΎΠΉΠ½Π΅!\"","title":"πŸ‡·πŸ‡Ί Русским Π³Ρ€Π°ΠΆΠ΄Π°Π½Π°ΠΌ"},{"location":"#to-citizens-of-russia","text":"We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism. One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences. You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say \"stop the war!\" This library provides an HTTP Basic authentication adapter for mezzio-authentication , and thus PSR-7 middleware applications.","title":"πŸ‡ΊπŸ‡Έ To Citizens of Russia"},{"location":"#installation","text":"Run the following to install this library: $ composer require mezzio/mezzio-authentication-basic","title":"Installation"},{"location":"#documentation","text":"Documentation is in the doc tree , and can be compiled using mkdocs : $ mkdocs build You may also browse the documentation online .","title":"Documentation"},{"location":"v1/config/","text":"Configuration To use the adapter, you will need to provide the following configuration: A valid mezzio-authentication UserRepositoryInterface service in your DI container. This service will perform the actual work of validating the supplied credentials. An HTTP Basic realm . This may be an arbitrary value, but is required by the specification . A response factory. If you are using Mezzio, this is already configured for you. As an example of configuration: // config/autoload/authentication.global.php use Mezzio\\Authentication\\AuthenticationInterface; use Mezzio\\Authentication\\Basic\\BasicAccess; use Mezzio\\Authentication\\UserRepositoryInterface; use Mezzio\\Authentication\\UserRepository\\PdoDatabase; return [ 'dependencies' => [ 'aliases' => [ // Use the default PdoDatabase user repository. This assumes // you have configured that service correctly. UserRepositoryInterface::class => PdoDatabase::class, // Tell mezzio-authentication to use the BasicAccess // adapter: AuthenticationInterface::class => BasicAccess::class, ], ], 'authentication' => [ 'realm' => 'api', ], ];","title":"Configuration"},{"location":"v1/config/#configuration","text":"To use the adapter, you will need to provide the following configuration: A valid mezzio-authentication UserRepositoryInterface service in your DI container. This service will perform the actual work of validating the supplied credentials. An HTTP Basic realm . This may be an arbitrary value, but is required by the specification . A response factory. If you are using Mezzio, this is already configured for you. As an example of configuration: // config/autoload/authentication.global.php use Mezzio\\Authentication\\AuthenticationInterface; use Mezzio\\Authentication\\Basic\\BasicAccess; use Mezzio\\Authentication\\UserRepositoryInterface; use Mezzio\\Authentication\\UserRepository\\PdoDatabase; return [ 'dependencies' => [ 'aliases' => [ // Use the default PdoDatabase user repository. This assumes // you have configured that service correctly. UserRepositoryInterface::class => PdoDatabase::class, // Tell mezzio-authentication to use the BasicAccess // adapter: AuthenticationInterface::class => BasicAccess::class, ], ], 'authentication' => [ 'realm' => 'api', ], ];","title":"Configuration"},{"location":"v1/intro/","text":"Introduction This component provides an HTTP Basic Authentication adapter for mezzio-authentication . HTTP Basic authentication utilizes the user-info section of the URL authority in order to provide credentials. While the HTTP specifications allow a single value for the user-info, most implementations require a : -separated credential, with the username first, and the password second; in fact, this is how browsers always send HTTP Basic credentials, as their prompts are always for the two values. As such, this implementation expects both a username and password in the supplied credentials . Only use in trusted networks Since HTTP Basic transmits the credentials via the URL, it should only be used within trusted networks, and never in public-facing sites, as the URL can be sniffed by MITM proxies.","title":"Introduction"},{"location":"v1/intro/#introduction","text":"This component provides an HTTP Basic Authentication adapter for mezzio-authentication . HTTP Basic authentication utilizes the user-info section of the URL authority in order to provide credentials. While the HTTP specifications allow a single value for the user-info, most implementations require a : -separated credential, with the username first, and the password second; in fact, this is how browsers always send HTTP Basic credentials, as their prompts are always for the two values. As such, this implementation expects both a username and password in the supplied credentials .","title":"Introduction"},{"location":"v1/intro/#only-use-in-trusted-networks","text":"Since HTTP Basic transmits the credentials via the URL, it should only be used within trusted networks, and never in public-facing sites, as the URL can be sniffed by MITM proxies.","title":"Only use in trusted networks"},{"location":"v1/usage/","text":"Usage Whenever you need an authenticated user, you can place the mezzio-authentication AuthenticationMiddleware in your pipeline. Globally If you need all routes to use authentication, add it globally. // In config/pipeline.php, within the callback: $app->pipe(Mezzio\\Authentication\\AuthenticationMiddleware::class); For an entire sub-path If you need all routes that begin with a particular sub-path to require authentication, use path-segregation : // In config/pipeline.php. // In the import statements: use Mezzio\\Authentication\\AuthenticationMiddleware; // In the callback: $app->pipe('/api', AuthenticationMiddleware::class); For a specific route If you want to restrict access for a specific route, create a route-specific middleware pipeline : // In config/routes.php, in the callback: $app->get( '/path/requiring/authentication', [ Mezzio\\Authentication\\AuthenticationMiddleware::class, HandlerRequiringAuthentication::class, // use your own handler here ] );","title":"Usage"},{"location":"v1/usage/#usage","text":"Whenever you need an authenticated user, you can place the mezzio-authentication AuthenticationMiddleware in your pipeline.","title":"Usage"},{"location":"v1/usage/#globally","text":"If you need all routes to use authentication, add it globally. // In config/pipeline.php, within the callback: $app->pipe(Mezzio\\Authentication\\AuthenticationMiddleware::class);","title":"Globally"},{"location":"v1/usage/#for-an-entire-sub-path","text":"If you need all routes that begin with a particular sub-path to require authentication, use path-segregation : // In config/pipeline.php. // In the import statements: use Mezzio\\Authentication\\AuthenticationMiddleware; // In the callback: $app->pipe('/api', AuthenticationMiddleware::class);","title":"For an entire sub-path"},{"location":"v1/usage/#for-a-specific-route","text":"If you want to restrict access for a specific route, create a route-specific middleware pipeline : // In config/routes.php, in the callback: $app->get( '/path/requiring/authentication', [ Mezzio\\Authentication\\AuthenticationMiddleware::class, HandlerRequiringAuthentication::class, // use your own handler here ] );","title":"For a specific route"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index a1c7a21..10c9a50 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,27 +2,18 @@ https://docs.mezzio.dev/mezzio-authentication-basic/ - 2024-01-01 - daily - - - https://docs.mezzio.dev/mezzio-authentication-basic/intro/ - 2024-01-01 - daily + 2024-10-16 https://docs.mezzio.dev/mezzio-authentication-basic/v1/config/ - 2024-01-01 - daily + 2024-10-16 https://docs.mezzio.dev/mezzio-authentication-basic/v1/intro/ - 2024-01-01 - daily + 2024-10-16 https://docs.mezzio.dev/mezzio-authentication-basic/v1/usage/ - 2024-01-01 - daily + 2024-10-16 \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 966898b..a9d0261 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ diff --git a/v1/config/index.html b/v1/config/index.html index 38d48e1..2c0906e 100644 --- a/v1/config/index.html +++ b/v1/config/index.html @@ -82,17 +82,6 @@ - -
    -
    - -
    -
    - API Tools
    - Build RESTful APIs in Minutes -
    -
    -
    @@ -217,7 +206,7 @@

    Search - GitHub + GitHub

    @@ -438,7 +427,7 @@
    Laminas
  • Laminas Project The new foundation for the community-supported, open source continuation of Zend Framework
  • Laminas Components and MVC Components and MVC for enterprise applications
  • Mezzio PSR-15 middleware in minutes
  • -
  • Laminas API Tools Build RESTful APIs in minutes
  • +
  • Maintenance Overview Current maintenance status of Laminas & Mezzio packages
  • @@ -455,13 +444,13 @@
  • - +
  • - +
  • - +
  • diff --git a/v1/intro/index.html b/v1/intro/index.html index 73ebfef..53c1f18 100644 --- a/v1/intro/index.html +++ b/v1/intro/index.html @@ -82,17 +82,6 @@ - -
    -
    - -
    -
    - API Tools
    - Build RESTful APIs in Minutes -
    -
    -
    @@ -217,7 +206,7 @@

    Search - GitHub + GitHub

    @@ -424,7 +413,7 @@
    Laminas
  • Laminas Project The new foundation for the community-supported, open source continuation of Zend Framework
  • Laminas Components and MVC Components and MVC for enterprise applications
  • Mezzio PSR-15 middleware in minutes
  • -
  • Laminas API Tools Build RESTful APIs in minutes
  • +
  • Maintenance Overview Current maintenance status of Laminas & Mezzio packages
  • @@ -441,13 +430,13 @@
  • - +
  • - +
  • - +
  • diff --git a/v1/usage/index.html b/v1/usage/index.html index 1f5450f..d8c0eca 100644 --- a/v1/usage/index.html +++ b/v1/usage/index.html @@ -82,17 +82,6 @@ - -
    -
    - -
    -
    - API Tools
    - Build RESTful APIs in Minutes -
    -
    -
    @@ -217,7 +206,7 @@

    Search - GitHub + GitHub

    @@ -439,7 +428,7 @@
    Laminas
  • Laminas Project The new foundation for the community-supported, open source continuation of Zend Framework
  • Laminas Components and MVC Components and MVC for enterprise applications
  • Mezzio PSR-15 middleware in minutes
  • -
  • Laminas API Tools Build RESTful APIs in minutes
  • +
  • Maintenance Overview Current maintenance status of Laminas & Mezzio packages
  • @@ -456,13 +445,13 @@
  • - +
  • - +
  • - +