0N/A/*
0N/A * CDDL HEADER START
0N/A *
0N/A * The contents of this file are subject to the terms of the
0N/A * Common Development and Distribution License, Version 1.0 only
0N/A * (the "License"). You may not use this file except in compliance
0N/A * with the License.
0N/A *
0N/A * You can obtain a copy of the license at
0N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/A * See the License for the specific language governing permissions
0N/A * and limitations under the License.
0N/A *
0N/A * When distributing Covered Code, include this CDDL HEADER in each
0N/A * file and include the License file at
0N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/A * add the following below this CDDL HEADER, with the fields enclosed
873N/A * by brackets "[]" replaced with your own identifying information:
0N/A * Portions Copyright [yyyy] [name of copyright owner]
0N/A *
0N/A * CDDL HEADER END
0N/A *
0N/A *
3215N/A * Copyright 2006-2008 Sun Microsystems, Inc.
0N/A */
0N/Apackage org.opends.server.types;
0N/A
0N/A
0N/A
0N/A/**
0N/A * This enumeration defines the set of possible authentication types
0N/A * that may be used for a bind request. This is based on the LDAP
0N/A * specification defined in RFC 2251.
0N/A */
2095N/A@org.opends.server.types.PublicAPI(
2095N/A stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
2095N/A mayInstantiate=false,
2095N/A mayExtend=false,
2095N/A mayInvoke=true)
0N/Apublic enum AuthenticationType
0N/A{
0N/A /**
0N/A * The authentication type that indicates that the user will be
0N/A * performing simple authentication (i.e., just a password).
0N/A */
0N/A SIMPLE((byte) 0x80),
0N/A
0N/A
0N/A
0N/A /**
0N/A * The authentication type that indicates that the user will be
0N/A * performing SASL authentication using some extensible mechanism.
0N/A */
0N/A SASL((byte) 0xA3),
0N/A
0N/A
0N/A
0N/A /**
0N/A * The authentication type that indicates that the associated
0N/A * connection is an internal connection.
0N/A */
0N/A INTERNAL((byte) 0xFF);
0N/A
0N/A
0N/A
0N/A // The BER type tag that is associated with this authentication
0N/A // type.
0N/A private byte berType;
0N/A
0N/A
0N/A
0N/A /**
0N/A * Creates a new authentication type with the provided BER type tag.
0N/A *
0N/A * @param berType The BER type tag that is associated with this
0N/A * authentication type.
0N/A */
0N/A private AuthenticationType(byte berType)
0N/A {
0N/A this.berType = berType;
0N/A }
0N/A
0N/A
0N/A
0N/A /**
0N/A * Retrieves the BER type tag associated with this authentication
0N/A * type.
0N/A *
0N/A * @return The BER type tag associated with this authentication
0N/A * type.
0N/A */
0N/A public int getBERType()
0N/A {
0N/A return berType;
0N/A }
0N/A
0N/A
0N/A
0N/A /**
0N/A * Retrieves a string representation of this authentication type.
0N/A *
0N/A * @return A string representation of this authentication type.
0N/A */
0N/A public String toString()
0N/A {
0N/A switch (berType)
0N/A {
0N/A case (byte) 0x80:
0N/A return "Simple";
0N/A case (byte) 0xA3:
0N/A return "SASL";
0N/A case (byte) 0xFF:
0N/A return "Internal";
0N/A default:
0N/A return "Unknown";
0N/A }
0N/A }
0N/A}
0N/A