https://github.com/arnaud-lb/albopenidserverbundle
OpenID Provider bundle
https://github.com/arnaud-lb/albopenidserverbundle
Last synced: about 2 months ago
JSON representation
OpenID Provider bundle
- Host: GitHub
- URL: https://github.com/arnaud-lb/albopenidserverbundle
- Owner: arnaud-lb
- Created: 2012-03-04T19:55:35.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-10-06T12:53:57.000Z (over 12 years ago)
- Last Synced: 2024-05-01T22:55:53.676Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 194 KB
- Stars: 5
- Watchers: 5
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AlbOpenIDServerBundle
OpenID Provider bundle.
This is a work in progress and untested, **do not use**.
## Installation
### Step1: Download AlbOpenIDServerBundle
#### Using the vendors script
Add the following lines in your deps file:
```
[AlbOpenIDServerBundle]
git=git://github.com/arnaud-lb/AlbOpenIDServerBundle.git
target=bundles/Alb/AlbOpenIDServerBundle
[php-openid]
git=git://github.com/openid/php-openid.git
target=openid/php-openid
```Now, run the vendors script to download the bundle:
``` sh
$ php bin/vendors install
```#### Using submodules
If you prefer instead to use git submodules, then run the following:
``` sh
$ git submodule add git://github.com/arnaud-lb/AlbOpenIDServerBundle.git vendor/bundles/Alb/AlbOpenIDServerBundle
$ git submodule add git://github.com/openid/php-openid.git vendor/openid/php-openid
$ git submodule update --init
```#### Using composer
TODO
### Step2: Configure the Autoloader
You can skip this step if you have installed the bundle using composer.
Add the ``Alb`` namespace to your autoloader:
``` php
registerNamespaces(array(
// ...
'Alb' => __DIR__.'/../vendor/',
));
```### Step3: Configure the include path
php-openid relies on his classes to be in the include path:
``` php
;use Alb\OpenIDServerBundle\Adapter\AdapterInterface;
class Adapter implements AdapterInterface
{
public function getUserUnique($user)
{
return $user->getId();
}
}
```Declare a service using this class:
``` yaml
# app/config/config.ymlservices:
my_open_id_server_adapter:
class: \Adapter
```## Configuring
### Bundle configuration
Add this to app/config/config.yml:
``` yaml
# app/config/config.ymlalb_open_id_server_bundle:
service:
adapter: my_open_id_server_adapter
```### Routing
Add this to app/config/routing.yml:
``` yaml
# app/config/routing.yml
alb_open_id_server:
resource: "@AlbOpenIDServerBundle/Resources/config/routing.xml"
prefix: /openid
```## Usage
The OpenID endpoint is at /openid (depending on the routes prefix)
## TODO
- Add tests
- More documentation