summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/javax/security
diff options
context:
space:
mode:
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-17 18:09:40 +0000
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-17 18:09:40 +0000
commit2d8cf20d0d5ca6b1fbdefc22229d4b7cf1497ede (patch)
treec976ca91e3ef0bda3b34b37c0195145638d8d08e /libjava/classpath/javax/security
parenta3ef37ddfeddcc5b0f1c5068d8fdeb25a302d5cd (diff)
downloadppe42-gcc-2d8cf20d0d5ca6b1fbdefc22229d4b7cf1497ede.tar.gz
ppe42-gcc-2d8cf20d0d5ca6b1fbdefc22229d4b7cf1497ede.zip
Imported GNU Classpath 0.20
* Makefile.am (AM_CPPFLAGS): Add classpath/include. * java/nio/charset/spi/CharsetProvider.java: New override file. * java/security/Security.java: Likewise. * sources.am: Regenerated. * Makefile.in: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109831 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/security')
-rw-r--r--libjava/classpath/javax/security/auth/login/AccountException.java64
-rw-r--r--libjava/classpath/javax/security/auth/login/AccountExpiredException.java2
-rw-r--r--libjava/classpath/javax/security/auth/login/AccountLockedException.java64
-rw-r--r--libjava/classpath/javax/security/auth/login/AccountNotFoundException.java64
-rw-r--r--libjava/classpath/javax/security/auth/login/CredentialException.java64
-rw-r--r--libjava/classpath/javax/security/auth/login/CredentialExpiredException.java2
-rw-r--r--libjava/classpath/javax/security/auth/login/CredentialNotFoundException.java65
-rw-r--r--libjava/classpath/javax/security/auth/login/LoginContext.java12
8 files changed, 334 insertions, 3 deletions
diff --git a/libjava/classpath/javax/security/auth/login/AccountException.java b/libjava/classpath/javax/security/auth/login/AccountException.java
new file mode 100644
index 00000000000..32f739a3106
--- /dev/null
+++ b/libjava/classpath/javax/security/auth/login/AccountException.java
@@ -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);
+ }
+}
diff --git a/libjava/classpath/javax/security/auth/login/AccountExpiredException.java b/libjava/classpath/javax/security/auth/login/AccountExpiredException.java
index 74a97a7dd3b..c2b61c6e028 100644
--- a/libjava/classpath/javax/security/auth/login/AccountExpiredException.java
+++ b/libjava/classpath/javax/security/auth/login/AccountExpiredException.java
@@ -42,7 +42,7 @@ package javax.security.auth.login;
* 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.
diff --git a/libjava/classpath/javax/security/auth/login/AccountLockedException.java b/libjava/classpath/javax/security/auth/login/AccountLockedException.java
new file mode 100644
index 00000000000..bcb8b4f8dfc
--- /dev/null
+++ b/libjava/classpath/javax/security/auth/login/AccountLockedException.java
@@ -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);
+ }
+}
diff --git a/libjava/classpath/javax/security/auth/login/AccountNotFoundException.java b/libjava/classpath/javax/security/auth/login/AccountNotFoundException.java
new file mode 100644
index 00000000000..a052fbf6876
--- /dev/null
+++ b/libjava/classpath/javax/security/auth/login/AccountNotFoundException.java
@@ -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);
+ }
+}
diff --git a/libjava/classpath/javax/security/auth/login/CredentialException.java b/libjava/classpath/javax/security/auth/login/CredentialException.java
new file mode 100644
index 00000000000..980adde9e51
--- /dev/null
+++ b/libjava/classpath/javax/security/auth/login/CredentialException.java
@@ -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);
+ }
+}
diff --git a/libjava/classpath/javax/security/auth/login/CredentialExpiredException.java b/libjava/classpath/javax/security/auth/login/CredentialExpiredException.java
index 03f7ec964a3..9827a3d86d3 100644
--- a/libjava/classpath/javax/security/auth/login/CredentialExpiredException.java
+++ b/libjava/classpath/javax/security/auth/login/CredentialExpiredException.java
@@ -42,7 +42,7 @@ package javax.security.auth.login;
* 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.
diff --git a/libjava/classpath/javax/security/auth/login/CredentialNotFoundException.java b/libjava/classpath/javax/security/auth/login/CredentialNotFoundException.java
new file mode 100644
index 00000000000..08ac115e349
--- /dev/null
+++ b/libjava/classpath/javax/security/auth/login/CredentialNotFoundException.java
@@ -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);
+ }
+}
diff --git a/libjava/classpath/javax/security/auth/login/LoginContext.java b/libjava/classpath/javax/security/auth/login/LoginContext.java
index a3cbf8f0651..740e67b8baa 100644
--- a/libjava/classpath/javax/security/auth/login/LoginContext.java
+++ b/libjava/classpath/javax/security/auth/login/LoginContext.java
@@ -82,7 +82,17 @@ public class LoginContext
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);
OpenPOWER on IntegriCloud