Skip to content

Instantly share code, notes, and snippets.

@Kallin
Created June 22, 2012 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kallin/2974264 to your computer and use it in GitHub Desktop.
Save Kallin/2974264 to your computer and use it in GitHub Desktop.
SamlAuthenticationToken.groovy
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken
import org.springframework.security.core.userdetails.UserDetails
class SamlAuthenticationToken extends UsernamePasswordAuthenticationToken {
String token
public SamlAuthenticationToken(String token) {
super(null, null);
this.token = token;
}
public SamlAuthenticationToken(UserDetails principal, String samlResponse) {
super(principal, samlResponse, principal.getAuthorities())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment