Jump to content
We've recently updated our Privacy Statement, available here ×

marcos.ramos

Members
  • Posts

    3
  • Joined

  • Last visited

marcos.ramos's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi. I'm having the same problem as many of you and I'll like to share with you what I've tried to try to get some pointers to solve the problem. I'm trying to integrate authentication with JasperServer (v5.1 here). There's an HTTP Header that contains the username. The username contained in the header must match the local jasperserver's username. Here are the files that I've modified. All in the /WEB-INF/ path inside /apache-tomcat/webapps/jasperserver/ applicationContext-security.xml js.sprint.properties my.auth.MyUserDetailsService.java
  2. Hi. I'm having the same problem and I'll like to share with you what I've tried to try to get some pointers to solve the problem.I'm trying to integrate authentication with JasperServer (v5.1 here). There's an HTTP Header that contains the username.The username contained in the header must match the local jasperserver's username. Here are the files that I've modified. All in the /WEB-INF/ path inside /apache-tomcat/webapps/jasperserver/ applicationContext-security.xml +? + (...)[/code] js.sprint.properties + bean.myAuthenticationFilter=myAuthenticationFilter+ bean.myPreAuthProvider=myPreAuthProvider[/code] my.auth.MyUserDetailsService.java package my.auth; import org.springframework.dao.DataAccessException; import org.springframework.security.GrantedAuthority; import org.springframework.security.GrantedAuthorityImpl; import org.springframework.security.userdetails.User; import org.springframework.security.userdetails.UserDetails; import org.springframework.security.userdetails.UserDetailsService; import org.springframework.security.userdetails.UsernameNotFoundException; public class MyUserDetailsService implements UserDetailsService { @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException { final String DEFAULT_ROLE = "ROLE_USER"; // default user's role on jasperserver final String DEFAULT_PASSWORD = "ThisIsATest"; // default user's password on jasperserver UserDetails user = new User(username, // username DEFAULT_PASSWORD, // password true, // enabled? true, // accountNonExpired? true, // credentialsNonExpired? true, // accountNonLocked? new GrantedAuthority[]{ // granted authority new GrantedAuthorityImpl(DEFAULT_ROLE) } ); return user; } }[/code]
  3. I agree. There's nothing simple about that. Plus, I believe there's a lack of documentation on that matter. The template is just that, a template. Not much information on how to implement authentication using the passed headers. The cookbook should go deeper with detailed examples on how to accomplish that. Regards, M
×
×
  • Create New...