Yes! That did it. Thank you for the clue! final HandlerResult result = this.delegate.authenticate(usernamePasswordCredential);
Map<String,Object> attributes = result.getPrincipal().getAttributes(); Easy peasy! *daniel spillers* University of Arkansas at Little Rock <http://ualr.edu/> | Information Technology Services 501.916.3010 | ualr.edu/itservices On Tue, Sep 27, 2016 at 9:35 AM, Daniel Spillers <[email protected]> wrote: > I may have found it. Would this be relevant? > > - HandlerResult.getPrincipal() > > <https://apereo.github.io/cas/4.0.x/javadocs/apidocs/org/jasig/cas/authentication/HandlerResult.html#getPrincipal()> > - Principal.getAttributes() > > <https://apereo.github.io/cas/4.0.x/javadocs/apidocs/org/jasig/cas/authentication/principal/Principal.html#getAttributes()> > > > > > > *daniel spillers* > University of Arkansas at Little Rock <http://ualr.edu/> | Information > Technology Services > 501.916.3010 | ualr.edu/itservices > > > On Tue, Sep 27, 2016 at 9:28 AM, Daniel Spillers <[email protected]> > wrote: > >> Excellent! Misagh, could you point me to any documentation that would >> guide me as to what methods or properties I would use on the HandlerResult >> to access the principal and its attributes? >> >> >> >> *daniel spillers* >> University of Arkansas at Little Rock <http://ualr.edu/> | Information >> Technology Services >> 501.916.3010 | ualr.edu/itservices >> >> >> On Mon, Sep 26, 2016 at 2:56 PM, Misagh Moayyed <[email protected]> >> wrote: >> >>> Depending on what those “things” are, you can either look at the >>> HandlerResult and peek into either the authentication object or the >>> principal associated with it, and you’ll find the attributes. >>> >>> -- >>> Misagh >>> >>> From: djspillers <[email protected]> <[email protected]> >>> Reply: djspillers <[email protected]> <[email protected]> >>> Date: September 26, 2016 at 11:06:52 PM >>> To: CAS Community <[email protected]> <[email protected]> >>> Subject: [cas-user] Re: Access to authenticatedEntryAttributes from >>> HandlerResult >>> >>> I might have titled this topic "access to LdapEntry attributes (perhaps >>> stored in principalAttributeMap?) instead of authenticatedEntryAttributes. >>> >>> On Monday, September 26, 2016 at 2:22:24 PM UTC-5, djspillers wrote: >>>> >>>> I've written my own Authentication Handler to do some extra things >>>> after authentication. I've overridden the >>>> authenticateUsernamePasswordInternal >>>> method and the first thing I do is run the authenticate method against the >>>> delegate: >>>> >>>> @Override >>>> protected HandlerResult authenticateUsernamePasswordInternal(final >>>> UsernamePasswordCredential usernamePasswordCredential) >>>> throws GeneralSecurityException, PreventedException { >>>> >>>> /** Authenticate. */ >>>> final HandlerResult result = this.delegate.authenticate(use >>>> rnamePasswordCredential); >>>> >>>> >>>> What I need to do is check some of the ldapEntry attributes that get >>>> populated after authentication (the delegate is >>>> an LdapAuthenticationHandler) in order to decide whether or not to do >>>> the "extra things". >>>> >>>> Do I have access to that information from within my authentication >>>> handler at this point, either from the delegate or the HandlerResult? Could >>>> anyone provide guidance, even guidance on what additional information I >>>> need to provide you? Thank you. >>>> >>>> *daniel spillers* >>>> University of Arkansas at Little Rock <http://ualr.edu/> | Information >>>> Technology Services >>>> 501.916.3010 | ualr.edu/itservices >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "CAS Community" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/a/ap >>> ereo.org/group/cas-user/. >>> To view this discussion on the web visit https://groups.google.com/a/ap >>> ereo.org/d/msgid/cas-user/080e9ebd-58d4-4b86-903e-c656247d1b >>> 5b%40apereo.org >>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/080e9ebd-58d4-4b86-903e-c656247d1b5b%40apereo.org?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/a/apereo.org/d/optout. >>> >>> >> > -- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CA%2BB8tW65J3sSP%3Dp7gAK-hBhqeWEJiig%3D_mPpsbTd2jjvrs9mkw%40mail.gmail.com. For more options, visit https://groups.google.com/a/apereo.org/d/optout.
