Source Code Cross Referenced for Assertion.java in  » 6.0-JDK-Modules-com.sun » xws-security » com » sun » xml » wss » saml » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules com.sun » xws security » com.sun.xml.wss.saml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Assertion.java
003:         *
004:         * Created on August 18, 2005, 12:08 PM
005:         */
006:
007:        /*
008:         * The contents of this file are subject to the terms
009:         * of the Common Development and Distribution License
010:         * (the License).  You may not use this file except in
011:         * compliance with the License.
012:         * 
013:         * You can obtain a copy of the license at
014:         * https://glassfish.dev.java.net/public/CDDLv1.0.html.
015:         * See the License for the specific language governing
016:         * permissions and limitations under the License.
017:         * 
018:         * When distributing Covered Code, include this CDDL
019:         * Header Notice in each file and include the License file
020:         * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
021:         * If applicable, add the following below the CDDL Header,
022:         * with the fields enclosed by brackets [] replaced by
023:         * you own identifying information:
024:         * "Portions Copyrighted [year] [name of copyright owner]"
025:         * 
026:         * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
027:         */
028:
029:        package com.sun.xml.wss.saml;
030:
031:        import com.sun.xml.ws.security.Token;
032:        import com.sun.xml.wss.XWSSecurityException;
033:        import java.math.BigInteger;
034:        import java.security.PrivateKey;
035:        import java.security.PublicKey;
036:        import java.security.cert.X509Certificate;
037:        import javax.xml.crypto.dsig.DigestMethod;
038:        import org.w3c.dom.Element;
039:        import org.w3c.dom.Node;
040:
041:        /**
042:         *
043:         * @author abhijit.das@sun.COM
044:         */
045:
046:        /**
047:         * This interface stands for <code>Assertion</code> element. An Assertion is a package
048:         * of information that supplies one or more <code>Statement</code> made by an
049:         * issuer. There are three kinds of assertions Authentication, Authorization
050:         * Decision and Attribute assertion.
051:         * <pre>
052:         *
053:         *       &lt;Assertion  AssertionID="1124370015917" IssueInstant="2005-08-18T18:30:15.917+05:30"
054:         *                      Issuer="CN=Assertion Issuer,OU=AI,O=Assertion Issuer,L=Waltham,ST=MA,C=US"
055:         *                      MajorVersion="1" MinorVersion="1"
056:         *                      xmlns="urn:oasis:names:tc:SAML:1.0:assertion">
057:         *         &lt;Conditions NotBefore="2005-08-16T13:21:50.503+05:30"
058:         *                        NotOnOrAfter="2005-08-16T15:21:50.504+05:30"/>
059:         *         &lt;Subject xmlns="urn:oasis:names:tc:SAML:1.0:assertion">
060:         *             &lt;NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName">
061:         *                 CN=SAML User,OU=SU,O=SAML User,L=Los Angeles,ST=CA,C=US
062:         *             &lt;/NameIdentifier>
063:         *
064:         *             &lt;SubjectConfirmation>
065:         *                 &lt;ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:sender-vouches&lt;/ConfirmationMethod>
066:         *             &lt;/SubjectConfirmation>
067:         *         &lt;/Subject>
068:         *         &lt;Attribute AttributeName="attribute1" AttributeNamespace="urn:com:sun:xml:wss:attribute">
069:         *             &lt;AttributeValue>ATTRIBUTE1&lt;/AttributeValue>
070:         *         &lt;/Attribute>
071:         *      &lt;Assertion>
072:         * </pre>
073:         */
074:        public interface Assertion extends Token {
075:
076:            /**
077:             * Sign the SAML Assertion - Enveloped Signature
078:             *
079:             * @param pubKey A <code>java.security.PublicKey</code> representing the public key used for Signature verification
080:             * @param privKey A <code>java.security.PrivateKey</code> representing the private key used for Signature calculation.
081:             *
082:             * By Default DigestMethod.SHA1 and SignatureMethod.RSA_SHA1 will be used.
083:             * @return An <code>org.w3c.dom.Element</code> representation of Signed SAML Assertion
084:             */
085:            public Element sign(PublicKey pubKey, PrivateKey privKey)
086:                    throws SAMLException;
087:
088:            public Element sign(X509Certificate cert, PrivateKey privKey)
089:                    throws SAMLException;
090:
091:            /**
092:             * sign the saml assertion (Enveloped Signature)
093:             * @param digestMethod DigestMethod to be used
094:             * @param signatureMethod SignatureMethod to be used.
095:             * @param pubKey PublicKey to be used for Signature verification
096:             * @param privKey PrivateKey to be used for Signature calculation
097:             *
098:             * @return An <code>org.w3c.dom.Element</code> representation of Signed SAML Assertion
099:             */
100:
101:            public Element sign(DigestMethod digestMethod,
102:                    String signatureMethod, PublicKey pubKey, PrivateKey privKey)
103:                    throws SAMLException;
104:
105:            public Element sign(DigestMethod digestMethod,
106:                    String signatureMethod, X509Certificate cert,
107:                    PrivateKey privKey) throws SAMLException;
108:
109:            /**
110:             * Set the saml major version
111:             * @param value A <code>java.math.BigInteger</code> representing
112:             * saml major version
113:             */
114:            public void setMajorVersion(java.math.BigInteger value);
115:
116:            /**
117:             * Set the saml minor version
118:             * @param value A <code>java.math.BigInteger</code> representing
119:             * saml minor version
120:             */
121:
122:            public void setMinorVersion(java.math.BigInteger value);
123:
124:            public void setVersion(String version);
125:
126:            /**
127:             * Convert SAML Assertion to <code>org.w3c.dom.Element</code>
128:             * @param doc the context <code>org.w3c.dom.Node</code> for the creation of the
129:             *      resulting <code>Element</code>.
130:             * @return org.w3c.dom.Element element representation of SAML Assertion
131:             */
132:            public Element toElement(Node doc) throws XWSSecurityException;
133:
134:            public String getSamlIssuer();
135:
136:            public String getAssertionID();
137:
138:            public String getID();
139:
140:            public String getVersion();
141:
142:            public BigInteger getMajorVersion();
143:
144:            public BigInteger getMinorVersion();
145:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.