4152N/A * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Astract class for SPNEGO tokens. 0N/A * Implementation is based on RFC 2478 0N/A * NegotiationToken ::= CHOICE { 0N/A * negTokenInit [0] NegTokenInit, 0N/A * negTokenTarg [1] NegTokenTarg } 0N/A * @author Seema Malkani 0N/A * The object identifier corresponding to the SPNEGO GSS-API 0N/A // should not happen 0N/A * Creates SPNEGO token of the specified type. 0N/A * Returns the individual encoded SPNEGO token 0N/A * @return the encoded token 0N/A * @exception GSSException 0N/A * Returns the encoded SPNEGO token 0N/A * Note: inserts the required CHOICE tags 0N/A * @return the encoded token 0N/A * @exception GSSException 0N/A // get the token encoded value 0N/A // now insert the CHOICE 0N/A // Insert CHOICE of Negotiation Token 0N/A // Insert CHOICE of Negotiation Token 0N/A * Returns the SPNEGO token type 0N/A * @return the token type 0N/A * Returns a string representing the token type. 0N/A * @param tokenType the token type for which a string name is desired 0N/A * @return the String name of this token type 0N/A return "SPNEGO NegTokenInit";
0N/A return "SPNEGO NegTokenTarg";
0N/A return "SPNEGO Mechanism Token";
0N/A * Returns the enumerated type of the Negotiation result. 0N/A * @param result the negotiated result represented by integer 0N/A * @return the enumerated type of Negotiated result 0N/A // unknown - return optimistic result 0N/A * Returns a string representing the negotiation result. 0N/A * @param result the negotiated result 0N/A * @return the String message of this negotiated result 0N/A return "Accept Complete";
0N/A return "Accept InComplete";
0N/A return (
"Unknown Negotiated Result: " +
result);
4152N/A * Checks if the context tag in a sequence is in correct order. The "last" 4152N/A * value must be smaller than "current". 4152N/A * @param last the last tag seen 4152N/A * @param current the current tag 4152N/A * @return the current tag, used as the next value for last 4152N/A * @throws GSSException if there's a wrong order 4152N/A "Invalid SpNegoToken token : wrong order");