001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)AuthenticationContext.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: /**
030: * FileUserDomain.java
031: *
032: * SUN PROPRIETARY/CONFIDENTIAL.
033: * This software is the proprietary information of Sun Microsystems, Inc.
034: * Use is subject to license terms.
035: */package com.sun.jbi.internal.security.auth;
036:
037: import java.util.logging.Logger;
038:
039: /**
040: * FileUserDomain is the handle to getting the user information.
041: * This interface will be refined further based on requirements.
042: *
043: * The methods in this interface throw Exception and no specific exception has been
044: * defined to keep the interface non-proprietary.
045: * @author Sun Microsystems, Inc.
046: */
047: public class AuthenticationContext extends
048: com.sun.jbi.internal.security.ContextImpl implements
049: com.sun.jbi.internal.security.UserDomain {
050: /** UserDomain Name. */
051: private String mName;
052:
053: /** Logger. */
054: private Logger mLogger;
055:
056: /** The StringTranslator. */
057: private AuthenticatorType mAuthType;
058:
059: /**
060: * Constructor.
061: *
062: * @param name is the logical name that identifies this user domain.
063: */
064: public AuthenticationContext(String name) {
065: super (null);
066: mLogger = Logger
067: .getLogger(com.sun.jbi.internal.security.Constants.PACKAGE);
068: mName = name;
069:
070: }
071:
072: /**
073: * Get the name of the User Domain.
074: * @return the name of the User Domain
075: */
076: public String getName() {
077: return mName;
078: }
079:
080: /**
081: * Set the User Domain Name.
082: * @param name is the name of the User Domain
083: */
084: public void setName(String name) {
085: mName = name;
086: }
087:
088: /**
089: * Get the Authentication Type for the domain.
090: *
091: * @return the Authentication Type.
092: */
093: public String getAuthType() {
094: return mAuthType.getValue();
095: }
096:
097: /**
098: * Set the Authentication Type for this domain.
099: *
100: * @param authType is the authentication type string, the only supported
101: * type in Shasta 1.0 is JAAS.
102: */
103: public void setAuthType(String authType) {
104: mAuthType = AuthenticatorType.valueOf(authType);
105: }
106:
107: /**
108: * Print the Contents of the Context to the Logger.
109: *
110: * @param logger is the java.util.Logger to use for printing out the contents.
111: * @param level is the logging level
112: */
113: public void print(java.util.logging.Logger logger,
114: java.util.logging.Level level) {
115: }
116: }
|