Skip to content

Commit

Permalink
Merge pull request #175 from ilyahoilik/patch-1
Browse files Browse the repository at this point in the history
Обновление перевода раздела Authentication
  • Loading branch information
slider23 committed Jan 15, 2017
2 parents 95ccb48 + a94ce00 commit c7cd0f3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions authentication.md
@@ -1,4 +1,4 @@
git cc0e4076b273b35ef98c1291133f2ebe4e9fb88f
git ae321319ee005632fcfe4a5bf8f3607dbb198855

---

Expand Down Expand Up @@ -157,7 +157,7 @@ if (Auth::check()) {
[Посредник маршрутов](/docs/{{version}}/middleware) может быть использован, чтобы позволить получить доступ к данному маршруту только пользователям прошедшим аутентификацию. Laravel поставляется с посредником `auth`, который описан в классе `Illuminate\Auth\Middleware\Authenticate`. Так как этот посредник уже зарегистрирован в HTTP kernel, все, что вам нужно сделать, это привязать посредник к конкретному маршруту:

```php
Route::get('profile', function() {
Route::get('profile', function () {
// только аутентифицированные пользователи могут войти...
})->middleware('auth');
```
Expand Down Expand Up @@ -314,7 +314,7 @@ if (Auth::once($credentials)) {

[HTTP Basic Authentication] (http://en.wikipedia.org/wiki/Basic_access_authentication) обеспечивает быстрый способ для аутентификации пользователей вашего приложения без создания специальной страницы входа. Чтобы приступить к работе, установите `auth.basic` [посредник](/docs/{{version}}/middleware) для маршрута. Посредник `auth.basic` входит в поставку фреймворка Laravel, так что вам не нужно определять его:
```php
Route::get('profile', function() {
Route::get('profile', function () {
// только аутентифицированные пользователи могут войти...
})->middleware('auth.basic');
```
Expand Down Expand Up @@ -359,7 +359,7 @@ class AuthenticateOnceWithBasicAuth
Теперь, [зарегистрируйте посредник маршрута](/docs/{{version}}/middleware#registering-middleware) и привяжите его к маршруту:

```php
Route::get('api/user', function() {
Route::get('api/user', function () {
// Only authenticated users may enter...
})->middleware('auth.basic.once');
```
Expand Down Expand Up @@ -388,7 +388,7 @@ Route::get('api/user', function() {
{
$this->registerPolicies();

Auth::extend('jwt', function($app, $name, array $config) {
Auth::extend('jwt', function ($app, $name, array $config) {
// Return an instance of Illuminate\Contracts\Auth\Guard...

return new JwtGuard(Auth::createUserProvider($config['provider']));
Expand Down Expand Up @@ -433,7 +433,7 @@ class AuthServiceProvider extends ServiceProvider
{
$this->registerPolicies();

Auth::provider('riak', function($app, array $config) {
Auth::provider('riak', function ($app, array $config) {
// Return an instance of Illuminate\Contracts\Auth\UserProvider...

return new RiakUserProvider($app->make('riak.connection'));
Expand Down

0 comments on commit c7cd0f3

Please sign in to comment.