1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.wss4j.stax.securityEvent;
20
21 import org.apache.wss4j.common.ext.WSSecurityException;
22 import org.apache.wss4j.common.principal.SAMLTokenPrincipal;
23 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
24 import org.apache.wss4j.stax.securityToken.SamlSecurityToken;
25
26 public class SamlTokenSecurityEvent extends IssuedTokenSecurityEvent<SamlSecurityToken> {
27
28 public SamlTokenSecurityEvent() {
29 super(WSSecurityEventConstants.SAML_TOKEN);
30 }
31
32 @Override
33 public String getIssuerName() throws WSSecurityException {
34 return getSamlAssertionWrapper().getIssuerString();
35 }
36
37 public SamlAssertionWrapper getSamlAssertionWrapper() throws WSSecurityException {
38 return ((SAMLTokenPrincipal)getSecurityToken().getPrincipal()).getToken();
39 }
40 }