classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Patch: javax.security.auth.login -vs- 1.5


From: Tom Tromey
Subject: [cp-patches] Patch: javax.security.auth.login -vs- 1.5
Date: 08 Dec 2005 08:49:04 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

I'm checking this in.

This updates javax.security.auth.login to 1.5.  Mostly this involved
adding new exceptions, and (compatibly) changing the superclass of a
couple of others.  There's also one new constructor.

Tom

2005-12-08  Tom Tromey  <address@hidden>

        * javax/security/auth/login/LoginContext.java (LoginContext): New
        constructor.
        * javax/security/auth/login/CredentialNotFoundException.java: New
        file.
        * javax/security/auth/login/CredentialExpiredException.java: Extends
        CredentialException.
        * javax/security/auth/login/CredentialException.java: New file.
        * javax/security/auth/login/AccountNotFoundException.java: New file.
        * javax/security/auth/login/AccountLockedException.java: New file.
        * javax/security/auth/login/AccountExpiredException.java: Extends
        AccountException.
        * javax/security/auth/login/AccountException.java: New file.

Index: javax/security/auth/login/AccountExpiredException.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/security/auth/login/AccountExpiredException.java,v
retrieving revision 1.2
diff -u -r1.2 AccountExpiredException.java
--- javax/security/auth/login/AccountExpiredException.java      2 Jul 2005 
20:32:46 -0000       1.2
+++ javax/security/auth/login/AccountExpiredException.java      8 Dec 2005 
15:50:56 -0000
@@ -42,7 +42,7 @@
  * An exception that signals that an attempt was made to login to an account
  * that has expired.
  */
-public class AccountExpiredException extends LoginException
+public class AccountExpiredException extends AccountException
 {
 
   // Constant.
Index: javax/security/auth/login/CredentialExpiredException.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/security/auth/login/CredentialExpiredException.java,v
retrieving revision 1.2
diff -u -r1.2 CredentialExpiredException.java
--- javax/security/auth/login/CredentialExpiredException.java   2 Jul 2005 
20:32:46 -0000       1.2
+++ javax/security/auth/login/CredentialExpiredException.java   8 Dec 2005 
15:50:56 -0000
@@ -42,7 +42,7 @@
  * An exception that signals an attempt to login with a credential that
  * has expired.
  */
-public class CredentialExpiredException extends LoginException
+public class CredentialExpiredException extends CredentialException
 {
 
   // Constant.
Index: javax/security/auth/login/LoginContext.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/security/auth/login/LoginContext.java,v
retrieving revision 1.4
diff -u -r1.4 LoginContext.java
--- javax/security/auth/login/LoginContext.java 19 Oct 2005 16:07:34 -0000      
1.4
+++ javax/security/auth/login/LoginContext.java 8 Dec 2005 15:50:56 -0000
@@ -82,7 +82,17 @@
                        final CallbackHandler cbHandler)
     throws LoginException
   {
-    Configuration config = Configuration.getConfig();
+    this (name, subject, cbHandler, null);
+  }
+
+  /** @since 1.5 */
+  public LoginContext (final String name, final Subject subject,
+                       final CallbackHandler cbHandler,
+                       Configuration config)
+    throws LoginException
+  {
+    if (config == null)
+      config = Configuration.getConfig();
     AppConfigurationEntry[] entries = config.getAppConfigurationEntry (name);
     if (entries == null)
       entries = config.getAppConfigurationEntry (OTHER);
Index: javax/security/auth/login/AccountException.java
===================================================================
RCS file: javax/security/auth/login/AccountException.java
diff -N javax/security/auth/login/AccountException.java
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ javax/security/auth/login/AccountException.java     1 Jan 1970 00:00:00 
-0000
@@ -0,0 +1,64 @@
+/* AccountException.java -- generic account exception
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.security.auth.login;
+
+/**
+ * This is the base class for various account-related exceptions.
+ * @since 1.5
+ */
+public class AccountException extends LoginException
+{
+  private static final long serialVersionUID = -2112878680072211787L;
+
+  /**
+   * Create a new exception object.
+   */
+  public AccountException()
+  {
+  }
+
+  /**
+   * Create a new exception with the indicated detail message.
+   * @param message the detail message
+   */
+  public AccountException(String message)
+  {
+    super(message);
+  }
+}
Index: javax/security/auth/login/AccountLockedException.java
===================================================================
RCS file: javax/security/auth/login/AccountLockedException.java
diff -N javax/security/auth/login/AccountLockedException.java
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ javax/security/auth/login/AccountLockedException.java       1 Jan 1970 
00:00:00 -0000
@@ -0,0 +1,64 @@
+/* AccountLockedException.java -- exception indicating locked account
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.security.auth.login;
+
+/**
+ * An exception indicating that an account is locked.
+ * @since 1.5
+ */
+public class AccountLockedException extends AccountException
+{
+  private static final long serialVersionUID = 8280345554014066334L;
+
+  /**
+   * Create a new exception object.
+   */
+  public AccountLockedException()
+  {
+  }
+
+  /**
+   * Create a new exception with the indicated detail message.
+   * @param message the detail message
+   */
+  public AccountLockedException(String message)
+  {
+    super(message);
+  }
+}
Index: javax/security/auth/login/AccountNotFoundException.java
===================================================================
RCS file: javax/security/auth/login/AccountNotFoundException.java
diff -N javax/security/auth/login/AccountNotFoundException.java
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ javax/security/auth/login/AccountNotFoundException.java     1 Jan 1970 
00:00:00 -0000
@@ -0,0 +1,64 @@
+/* AccountNotFoundException.java -- exception indicating account not found
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.security.auth.login;
+
+/**
+ * An exception indicating that an account was not found.
+ * @since 1.5 
+ */
+public class AccountNotFoundException extends AccountException
+{
+  private static final long serialVersionUID = 1498349563916294614L;
+
+  /**
+   * Create a new exception object.
+   */
+  public AccountNotFoundException()
+  {
+  }
+
+  /**
+   * Create a new exception with the given detail message.
+   * @param message the detail message
+   */
+  public AccountNotFoundException(String message)
+  {
+    super(message);
+  }
+}
Index: javax/security/auth/login/CredentialException.java
===================================================================
RCS file: javax/security/auth/login/CredentialException.java
diff -N javax/security/auth/login/CredentialException.java
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ javax/security/auth/login/CredentialException.java  1 Jan 1970 00:00:00 
-0000
@@ -0,0 +1,64 @@
+/* CredentialException.java -- generic credential exception
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.security.auth.login;
+
+/**
+ * This is the base class for various credential-related exceptions.
+ * @since 1.5
+ */
+public class CredentialException extends LoginException
+{
+  private static final long serialVersionUID = -4772893876810601859L;
+
+  /**
+   * Create a new exception object.
+   */
+  public CredentialException()
+  {
+  }
+
+  /**
+   * Create a new exception with the given detail message.
+   * @param message the detail message
+   */
+  public CredentialException(String message)
+  {
+    super(message);
+  }
+}
Index: javax/security/auth/login/CredentialNotFoundException.java
===================================================================
RCS file: javax/security/auth/login/CredentialNotFoundException.java
diff -N javax/security/auth/login/CredentialNotFoundException.java
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ javax/security/auth/login/CredentialNotFoundException.java  1 Jan 1970 
00:00:00 -0000
@@ -0,0 +1,65 @@
+/* CredentialNotFoundException.java -- exception thrown when credentials
+   expire
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.security.auth.login;
+
+/**
+ * An exception that indicates that a credential was not found.
+ * @since 1.5
+ */
+public class CredentialNotFoundException extends CredentialException
+{
+  private static final long serialVersionUID = -7779934467214319475L;
+
+  /**
+   * Create a new exception.
+   */
+  public CredentialNotFoundException()
+  {
+  }
+
+  /**
+   * Create a new exception with the given detail message.
+   * @param message the detail message
+   */
+  public CredentialNotFoundException(String message)
+  {
+    super(message);
+  }
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]