Use PrincipalFactory: https://github.com/Jasig/cas/blob/4.1.x/cas-server-core-api/src/main/java/org/jasig/cas/authentication/principal/PrincipalFactory.java
in particular, the default implementation: https://github.com/Jasig/cas/blob/4.1.x/cas-server-core/src/main/java/org/jasig/cas/authentication/principal/DefaultPrincipalFactory.java Cheers, D. > On Feb 8, 2016, at 05:47, Petr Gašparík - AMI Praha a.s. > <[email protected]> wrote: > > Hi, > We have extended CAS with MFA in version 4.0. > This piece of code worked ok, creating new principal > > attrs.put(PRINCIPAL_ATTR_ROLES, roles); > attrs.put(PRINCIPAL_ATTR_EMAIL_ADDRESS, emailAddress); > logger.info("Creating new principal - username: {}, emailAddress: > {}, roles: {}", username, emailAddress, roles); > return new SimplePrincipal(username, attrs); > > Since 4.1, SimplePrincipal is private. How to achieve this functionality in > 4.1? > > Thanks! > Kind regards, Petr > -- > 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]. > Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. -- 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]. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
