Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 702503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:43:40+00:00 2026-05-14T03:43:40+00:00

I need send certain attributes(say, human readable user name) from server to client after

  • 0

I need send certain attributes(say, human readable user name) from server to client after a successful authentication. Server part was done. Now attribute was sent to client. From log, I can see:

2010-03-28 23:48:56,669 DEBUG
Cas20ServiceTicketValidator:185 –
Server response: http://www.yale.edu/tp/cas’>

a@b.com

        <cas:proxyGrantingTicket>PGTIOU-1-QZgcN61oAZcunsC9aKxj-cas</cas:proxyGrantingTicket>



        <cas:attributes>

                <cas:FullName>Test account 1</cas:FullName>

        </cas:attributes>

</cas:authenticationSuccess> </cas:serviceResponse>

Yet, I don’t know how to access the attribute in client(I am using Spring security 2.0.5).

In authenticationProvider, a userDetailsService is configured to read db for authenticated principal.

<bean id="casAuthenticationProvider" class="org.springframework.security.providers.cas.CasAuthenticationProvider">
    <sec:custom-authentication-provider />
    <property name="userDetailsService" ref="clerkManager"/>
    <!-- other stuff goes here -->
</bean>

Now in my controller, I can easily do this:

 Clerk currentClerk = (Clerk)SecurityContextHolder.getContext().getAuthentication().getPrincipal();

Ideally, I can fill the attribute to this Clerk object as another property in some way. How to do this?

Or what is recommended approach to share attributes across all apps under CAS’s centralized nature?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:43:41+00:00Added an answer on May 14, 2026 at 3:43 am

    For SpringSecurity – you need to upgrade to 3.x to leverage CAS attributes via the built-in support, see: GrantedAuthorityFromAssertionAttributesUserDetailsService.java

    It doesn’t look like SpringSecurity 2.x populates based on CAS attributes – if you look at:

    CasAuthenticationProvider.java at getUserDetailsService():

    /**
     * Template method for retrieving the UserDetails based on the assertion.  Default is to call configured userDetailsService and pass the username.  Deployers
     * can override this method and retrieve the user based on any criteria they desire.
     * 
     * @param assertion The CAS Assertion.
     * @returns the UserDetails.
     */
    protected UserDetails loadUserByAssertion(final Assertion assertion) {
        return this.userDetailsService.loadUserByUsername(assertion.getPrincipal().getName());
    }
    

    You could of course override this with a UserDetails implementation, if you have to stay on 2.x for some reason.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 491k
  • Answers 491k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer PyList_Append does indeed increment the reference counter, so, yes, the… May 16, 2026 at 10:01 am
  • Editorial Team
    Editorial Team added an answer Yes, buf is being used here as an out-parameter. The… May 16, 2026 at 10:01 am
  • Editorial Team
    Editorial Team added an answer "Undefined behavior" means that anything can happen. This also includes… May 16, 2026 at 10:01 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Customers from around the world can send certain 'requests' to my server application. All
We need to send newsletter/messages to our users at certain times. This is done
In testing certain network device driver receive features, I need to send special packets
I need to send click information on my website to a third party server
I need to send data from my iPhone application to my webserver, and back.
I want to send some data to a user after they log in to
I need to send messages to the GUI thread which should be processed the
I have multiple threads which need to send UDP packets to different IP addresses
I'm trying to do a remote desktop viewer. For this I need to send
every time i am writing some data to my server i first send a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.