10000 Update security with new provider · Lucky-Loek/Symfony-API-Example@bedb1bc · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 17, 2019. It is now read-only.

Commit bedb1bc

Browse files
author
Loek van der Linde
committed
Update security with new provider
1 parent 9deb635 commit bedb1bc

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

app/config/security.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,27 @@
22
# http://symfony.com/doc/current/security.html
33
security:
44

5+
encoders:
6+
AppBundle\Entity\User:
7+
algorithm: bcrypt
8+
59
# http://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
610
providers:
7-
in_memory:
8-
memory: ~
11+
database_provider:
12+
entity:
13+
class: AppBundle:User
14+
property: username
915

1016
firewalls:
1117
# disables authentication for assets and the profiler, adapt it according to your needs
1218
dev:
1319
pattern: ^/(_(profiler|wdt)|css|images|js)/
1420
security: false
1521

16-
main:
22+
default:
1723
anonymous: ~
18-
# activate different ways to authenticate
19-
20-
# http_basic: ~
24+
http_basic: ~
25+
provider: database_provider
2126
# http://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
2227

2328
# form_login: ~

0 commit comments

Comments
 (0)
0