neznajki / json-rpc-authorization
authorization for json rpc
v0.1.7
2020-07-24 09:01 UTC
Requires
- neznajki/json-rpc-common: ^1.0
Requires (Dev)
- symfony/dependency-injection: ^4.3
- symfony/security: ^4.3
README
makes authorization for json rpc
bundle installation
- composer require neznajki/json-rpc-authorization
- services.yaml
imports: - { resource: '@JsonRpcAuthBundle/Resources/config/services.yaml' }
- security.yaml
providers: #... jsonRpcProvider: id: JsonRpcAuthorizationBundle\Service\DefaultUserProviderService firewalls: #... jsonRpc: pattern: ^/jsonRpc provider: jsonRpcProvider guard: authenticators: - JsonRpcAuthorizationBundle\Service\AuthenticationService access_control: #... - { path: '^/jsonRpc', roles: ROLE_RPC_USER}
- parameters.yaml
pareameters: server.json.rpc.user.name: authorization server.json.rpc.user.password: qwerty