Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,361
Community Members
 
Community Events
184
Community Groups

How to get requested attributes from CrowdId with Spring Security

I have a Spring boot application with spring security 4.0.4. I'm using spring security openId feature with this configuration:

@Override
protected void configure(HttpSecurity http) throws Exception {

    OpenIDAttribute email = new OpenIDAttribute("email", "http://axschema.org/contact/email");
    email.setRequired(true);

    OpenIDAttribute fullname = new OpenIDAttribute("fullname","http://axschema.org/namePerson");
    fullname.setRequired(true);
	
	http
        .authorizeRequests()
        .antMatchers("/", "/home").permitAll()
        .anyRequest().authenticated()
        .and()
        .openidLogin()
        .authenticationUserDetailsService(token -> {
            Collection<GrantedAuthority> authorities = new ArrayList<>();
            authorities.add((GrantedAuthority) () -> "USER");
            authorities.add((GrantedAuthority) () -> "ADMIN");

            return new User("johndoe", "pass", authorities);
        })
        .attributeExchange("http://my.server.name:8095/openidserver/.*")
        .attribute(email)
        .attribute(fullname);
}

 

When i make a request to http://my.server.name:8095/openidserver/op ,

then the query string parameters are :

openid.ns: http://specs.openid.net/auth/2.0
openid.claimed_id: http://specs.openid.net/auth/2.0/identifier_select
openid.identity: http://specs.openid.net/auth/2.0/identifier_select
openid.return_to: http://localhost:8080/login/openid
openid.realm: http://localhost:8080/
openid.assoc_handle: shared21
openid.mode: checkid_setup
openid.ns.ext1: http://openid.net/srv/ax/1.0
openid.ext1.mode: fetch_request
openid.ext1.type.email: http://axschema.org/contact/email
openid.ext1.type.fullname: http://axschema.org/namePerson
openid.ext1.required: email, fullname

I'm able to get token with status "SUCCESS" but the problem is I can't get any attributes with it. What should i do to get attributes?

Thanks.

 

4 answers

Hi,

How to use CrowdID to authenticate User from WebApp ? 

Thank you In advance.

Hi,

How to use CROWDID (openID) to authenticate User from WebApp ? 

Thank you In advance.

0 votes
Caspar Krieger
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 14, 2016

@Destan Sarpkaya, sorry, I don't know off the top of my head and I am no longer working on Crowd. Your best bet is to raise a support request at https://support.atlassian.com so our support engineers can pass your question on to the current Crowd developers.

Hi @Caspar Krieger

Do you have any clue about what URI should we use in order to request the email from crowd during openid login request? apparently `http://axschema.org/contact/email` is not working.

There is nothing in crowd docs about open id attributes sad any help appreciated.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events