001: /*
002: * SAMLCallback.java
003: *
004: * Created on October 6, 2006, 2:30 PM
005: *
006: * To change this template, choose Tools | Template Manager
007: * and open the template in the editor.
008: */
009:
010: package com.sun.xml.wss.impl.callback;
011:
012: import com.sun.xml.wss.saml.Assertion;
013: import com.sun.xml.wss.saml.AuthorityBinding;
014: import javax.security.auth.callback.Callback;
015: import javax.xml.bind.JAXBElement;
016: import org.w3c.dom.Element;
017: import javax.xml.stream.XMLStreamReader;
018:
019: /**
020: *
021: *
022: */
023: public class SAMLCallback extends XWSSCallback implements Callback {
024:
025: Element assertion;
026: Element authorityBinding;
027: //Assertion jaxbAssertion;
028: AuthorityBinding authorityInfo;
029: XMLStreamReader assertionStream;
030:
031: String confirmation = null;
032: String version = null;
033: String assertionId = null;
034:
035: public static final String SV_ASSERTION_TYPE = "SV-Assertion";
036: public static final String HOK_ASSERTION_TYPE = "HOK-Assertion";
037:
038: public static final String V10_ASSERTION = "SAML10Assertion";
039: public static final String V11_ASSERTION = "SAML11Assertion";
040: public static final String V20_ASSERTION = "SAML20Assertion";
041:
042: /** Creates a new instance of SAMLCallback */
043: public SAMLCallback() {
044: }
045:
046: public void setAssertionElement(Element samlAssertion) {
047: assertion = samlAssertion;
048: }
049:
050: public void setAssertionReader(XMLStreamReader samlAssertion) {
051: this .assertionStream = samlAssertion;
052: }
053:
054: public Element getAssertionElement() {
055: return assertion;
056: }
057:
058: public XMLStreamReader getAssertionReader() {
059: return this .assertionStream;
060: }
061:
062: public void setAuthorityBindingElement(Element authority) {
063: authorityBinding = authority;
064: }
065:
066: public Element getAuthorityBindingElement() {
067: return authorityBinding;
068: }
069:
070: public AuthorityBinding getAuthorityBinding() {
071: return authorityInfo;
072: }
073:
074: public void setAuthorityBinding(AuthorityBinding auth) {
075: authorityInfo = auth;
076: }
077:
078: public void setConfirmationMethod(String meth) {
079: confirmation = meth;
080: }
081:
082: public String getConfirmationMethod() {
083: return confirmation;
084: }
085:
086: public String getSAMLVersion() {
087: return version;
088: }
089:
090: public void setSAMLVersion(String ver) {
091: version = ver;
092: }
093:
094: public void setAssertionId(String id) {
095: assertionId = id;
096: }
097:
098: public String getAssertionId() {
099: return assertionId;
100: }
101: }
|