This plugin aims to implement WSSE authentication for Symfony 1. It uses sfGuardUser to validate authentication username and password. In other words: you must create a sfGuardUser and use its username and encrypted password to generate WSSE credentials.
-
Go to the plugins root (usually:
/plugins
) -
Install the plugin:
git clone https://github.com/stadline/sfWSSEAuthenticationPlugin.git sfWSSEAuthenticationPlugin
- Edit ProjectConfiguration.class.php to activate the plugin:
$this->enablePlugins(array(
...
'sfWSSEAuthenticationPlugin',
));
- Clear the cache:
./symfony cc
To activate the plugin, you need to change the filter responsible of the security.
-
Go to
/apps/<yourApp>/config
and edit filters.yml -
Modify the class under security filter:
security:
class: sfWsseSecurityFilter
- Additionally, you might turn of session storage to allow stateless operations. To do that you need to change the storage class in factories.yml.
all:
storage:
class: sfNoStorage
- You can also turn off the filter using environment parameters. To do that you need to edit the app.yml file.
test:
security:
enabled: false
You can use the wsse:generate-credentials
task to generate a valid WSSE UsernameToken and get the user encrypted password