This bundle allows Symfony apps to authenticate users against Atlassian Crowd.
Require the package via composer:
composer.json
:
"require": {
...
"seiffert/crowd-auth-bundle": "dev-master",
...
}
Activate the bundle and it's dependent bundle SeiffertCrowdRestBundle
in your AppKernel:
app/AppKernel.php
:
public function registerBundles()
{
$bundles = array(
...
new Seiffert\CrowdRestBundle\SeiffertCrowdRestBundle(),
new Seiffert\CrowdRestBundle\SeiffertCrowdAuthBundle(),
...
);
...
}
To connect to your organization's Crowd instance, you have to add some entries to your project configuration (e.g. in
app/config/config.yml
):
seiffert_crowd_rest:
url: https://<crowd-url>/crowd/rest/usermanagement/1
application:
name: <application-name>
password: <application-password>
- crowd-url: Your Crowd instance's Url/Hostname.
- application-name: The name of your application registered in Crowd.
- application-password: The password of your application registered in Crowd.
To use the bundle's authentication provider, you can use it as an extension for Symfony's SecurityBundle
.
In your project's security.yml
, you need to configure a plaintext password encoder, the bundle's user provider and
use the key crowd_login
insteadof form_login
in your firwall definition. Everything else works exactly as with a
normal form login: You decide about URLs and the login form.
Example security.yml
:
security:
encoders:
PS\CrowdRestBundle\Crowd\User: plaintext
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
crowd:
id: ps.crowd_auth.user_provider
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
login:
pattern: ^/auth/login$
security: false
secured_area:
pattern: ^/
crowd_login:
check_path: /auth/check
login_path: /auth/login
logout:
path: /auth/logout
target: /
access_control:
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/, roles: ROLE_USER }
crowd-auth-bundle's People
crowd-auth-bundle's Issues
SSO support
Hi,
Any plan on supporting SSO?
Seems pretty easy to integrate, don't you think? https://developer.atlassian.com/display/CROWDDEV/Crowd+REST+Resources#CrowdRESTResources-CrowdSSOTokenResource
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.