001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
005 *
006 * The contents of this file are subject to the terms
007 * of the Common Development and Distribution License
008 * (the License). You may not use this file except in
009 * compliance with the License.
010 *
011 * You can obtain a copy of the License at
012 * https://opensso.dev.java.net/public/CDDLv1.0.html or
013 * opensso/legal/CDDLv1.0.txt
014 * See the License for the specific language governing
015 * permission and limitations under the License.
016 *
017 * When distributing Covered Code, include this CDDL
018 * Header Notice in each file and include the License file
019 * at opensso/legal/CDDLv1.0.txt.
020 * If applicable, add the following below the CDDL Header,
021 * with the fields enclosed by brackets [] replaced by
022 * your own identifying information:
023 * "Portions Copyrighted [year] [name of copyright owner]"
024 *
025 * $Id: SecurityToken.java,v 1.8 2008/08/27 19:05:52 mrudul_uchil Exp $
026 *
027 */
028
029package com.sun.identity.wss.security;
030
031import org.w3c.dom.Element;
032 
033/**
034 * This interface represents WS-Security token that can be inserted into
035 * or extracted from SOAP messages headers for Web Services Security 
036 * transactions. 
037 *
038 * <p> Each Security Token must need to implement this interface along with
039 * <code>SecurityTokenSpec</code> for generating the Security Tokens. 
040 * 
041 * @supported.all.api
042 */
043public interface SecurityToken {
044      
045     /**
046      * The <code>URI</code> to identify the WS-Security SAML Security Token.
047      */
048     public static final String WSS_SAML_TOKEN = "urn:sun:wss:samltoken";
049     
050     /**
051      * The <code>URI</code> to identify the WS-Security SAML2 Security Token.
052      */
053     public static final String WSS_SAML2_TOKEN = "urn:sun:wss:saml2token";
054
055     /**
056      * The <code>URI</code> to identify the WS-Security X509 Security Token
057      */
058     public static final String WSS_X509_TOKEN = "urn:sun:wss:x509token";
059
060     /**
061      * The <code>URI</code> to identify the WS-Security UserName Security Token
062      */
063     public static final String WSS_USERNAME_TOKEN = 
064                                 "urn:sun:wss:usernametoken";
065     /**
066      * The <code>URI</code> to identify the Liberty SAML Security Token
067      */
068     public static final String LIBERTY_ASSERTION_TOKEN = 
069                                 "urn:sun:wss:libertyassertion";
070     
071     /**
072      * The <code>URI</code> to identify the WS-Security Kerberos Security Token
073      */
074     public static final String WSS_KERBEROS_TOKEN = "urn:sun:wss:kerberostoken";
075     
076     /**
077      * The <code>URI</code> is to identify the OpenSSO security
078      * token. The OpenSSO security token contains SSOToken.
079      */
080     public static final String WSS_FAM_SSO_TOKEN = "urn:sun:wss:ssotoken";
081
082     /** 
083      * Returns the security token type. The possible values are
084      *      {@link #WSS_SAML_TOKEN},
085      *      {@link #WSS_X509_TOKEN}
086      *      {@link #WSS_USERNAME_TOKEN}
087      *      {@link #WSS_SAML2_TOKEN}
088      */
089      public String getTokenType();
090
091      /**
092       * Converts the Security Token into DOM Object.
093       * 
094       * @return the DOM Document Element.
095       *
096       * @exception SecurityException if any failure is occured.
097       */
098      public Element toDocumentElement() throws SecurityException;
099
100}




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.