01: /*
02: * The contents of this file are subject to the terms
03: * of the Common Development and Distribution License
04: * (the License). You may not use this file except in
05: * compliance with the License.
06: *
07: * You can obtain a copy of the license at
08: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
09: * See the License for the specific language governing
10: * permissions and limitations under the License.
11: *
12: * When distributing Covered Code, include this CDDL
13: * Header Notice in each file and include the License file
14: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
15: * If applicable, add the following below the CDDL Header,
16: * with the fields enclosed by brackets [] replaced by
17: * you own identifying information:
18: * "Portions Copyrighted [year] [name of copyright owner]"
19: *
20: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
21: */
22:
23: package com.sun.xml.wss.impl.callback;
24:
25: import javax.security.auth.Subject;
26: import org.w3c.dom.Element;
27: import javax.xml.stream.XMLStreamReader;
28:
29: public interface SAMLAssertionValidator {
30:
31: /**
32: * SAML validator.
33: * @param assertion the assertion to be validated
34: * successful validation.
35: * @throws SAMLValidationException if the SAML Assertion is invalid
36: */
37: public void validate(Element assertion)
38: throws SAMLValidationException;
39:
40: /**
41: * SAML validator.
42: * @param assertion the assertion to be validated
43: * successful validation.
44: * @throws SAMLValidationException if the SAML Assertion is invalid
45: */
46: public void validate(XMLStreamReader assertion)
47: throws SAMLValidationException;
48:
49: public static class SAMLValidationException extends Exception {
50:
51: public SAMLValidationException(String message) {
52: super (message);
53: }
54:
55: public SAMLValidationException(String message, Throwable cause) {
56: super (message, cause);
57: }
58:
59: public SAMLValidationException(Throwable cause) {
60: super(cause);
61: }
62: }
63: }
|