From a9e786f3f6d66e196b02907abe1029dedbd8e1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bj=C3=B8rnskov?= Date: Mon, 31 Aug 2015 12:24:00 +0200 Subject: [PATCH] Update README.md --- README.md | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 2304884..76160a2 100644 --- a/README.md +++ b/README.md @@ -15,40 +15,6 @@ then "hijack" the request by rendering a body with a token `{ "token" : "json we The second uses the `Authorization: Bearer ` header style to authenticate your users by validating the JWT. -Using Symfony Standard it would look something like: +If you use Symfony Full Stack there is a [AntennaBundle](https://github.com/flint/AntennaBundle) which provides a simple integration. -``` yaml -services: - antenna.coder: - class: Antenna\Coder - arguments: ['shared-secret'] - - antenna.username_password_authenticator: - class: Antenna\Security\UsernamePasswordAuthenticator - arguments: [@security.user_checker, @security.password_encoder, @antenna.coder] - - antenna.token_authenticator: - class: Antenna\Security\TokenAuthenticator - arguments: [@security.user_checker, @antenna.coder] - -security: - providers: - in_memory: - memory: - users: - henrikbjorn: - password: my-unique-password - roles: 'ROLE_USER' - - firewalls: - token_exchange: - pattern: ^/auth - simple-preauth: - provider: in_memory - authenticator: antenna.username_password_authenticator - web_token: - pattern: ^/api - simple-preauth: - provider: in_memory - authenticator: antenna.token_authenticator -``` +Also look in the bundle if you want to know how to integrate with other libraries that use Symfony Security.