mink67/security_bundle

1.0.8 2022-08-22 13:26 UTC

This package is not auto-updated.

Last update: 2024-09-30 23:25:50 UTC


README

添加配置文件

  • config/packages 目录下创建文件 mink67_security.yaml

  • 在文件中添加以下内容

        mink67_security:
            jwk_url: "https://:8081/auth/realms/RNA/protocol/openid-connect/certs"
            host: "https://:8081"
            keycloak_realm: "realm"
            path_token: "auth/realms/master/protocol/openid-connect/token"
            keycloak_user_name: "admin"
            keycloak_pw: "admin"
            keycloak_client_secret: "xxx-xxx-xxx"
            keycloak_client_id: "admin-cli"
    
    

添加包

    $ composer require mink67/security_bundle

config/packages 目录下的 security.yaml 文件中添加新的提供者和新的防火墙

```

    https://:8081/auth/realms/pao/protocol/openid-connect/certs
    security:
        ...

        providers:
            ...
            oauth:
                id: Mink67\Security\User\OAuthUserProvider
            ...
        ...
    ...
    firewalls:
        ...
        api:
            pattern:   ^/api/
            provider: oauth
            stateless: true

        ...
    ...
        
```