165 * {@code setConfiguration} method. The installed Configuration object
166 * can be obtained by calling the {@code getConfiguration} method.
167 *
168 * <p> If no Configuration object has been installed in the runtime, a call to
169 * {@code getConfiguration} installs an instance of the default
170 * Configuration implementation (a default subclass implementation of this
171 * abstract class).
172 * The default Configuration implementation can be changed by setting the value
173 * of the {@code login.configuration.provider} security property to the fully
174 * qualified name of the desired Configuration subclass implementation.
175 *
176 * <p> Application code can directly subclass Configuration to provide a custom
177 * implementation. In addition, an instance of a Configuration object can be
178 * constructed by invoking one of the {@code getInstance} factory methods
179 * with a standard type. The default policy type is "JavaLoginConfig".
180 * See the Configuration section in the <a href=
181 * "{@docRoot}/../specs/security/standard-names.html#configuration-types">
182 * Java Security Standard Algorithm Names Specification</a>
183 * for a list of standard Configuration types.
184 *
185 * @see javax.security.auth.login.LoginContext
186 * @see java.security.Security security properties
187 */
188 public abstract class Configuration {
189
190 private static Configuration configuration;
191
192 private final java.security.AccessControlContext acc =
193 java.security.AccessController.getContext();
194
195 private static void checkPermission(String type) {
196 SecurityManager sm = System.getSecurityManager();
197 if (sm != null) {
198 sm.checkPermission(new AuthPermission
199 ("createLoginConfiguration." + type));
200 }
201 }
202
203 /**
204 * Sole constructor. (For invocation by subclass constructors, typically
|
165 * {@code setConfiguration} method. The installed Configuration object
166 * can be obtained by calling the {@code getConfiguration} method.
167 *
168 * <p> If no Configuration object has been installed in the runtime, a call to
169 * {@code getConfiguration} installs an instance of the default
170 * Configuration implementation (a default subclass implementation of this
171 * abstract class).
172 * The default Configuration implementation can be changed by setting the value
173 * of the {@code login.configuration.provider} security property to the fully
174 * qualified name of the desired Configuration subclass implementation.
175 *
176 * <p> Application code can directly subclass Configuration to provide a custom
177 * implementation. In addition, an instance of a Configuration object can be
178 * constructed by invoking one of the {@code getInstance} factory methods
179 * with a standard type. The default policy type is "JavaLoginConfig".
180 * See the Configuration section in the <a href=
181 * "{@docRoot}/../specs/security/standard-names.html#configuration-types">
182 * Java Security Standard Algorithm Names Specification</a>
183 * for a list of standard Configuration types.
184 *
185 * @since 1.4
186 * @see javax.security.auth.login.LoginContext
187 * @see java.security.Security security properties
188 */
189 public abstract class Configuration {
190
191 private static Configuration configuration;
192
193 private final java.security.AccessControlContext acc =
194 java.security.AccessController.getContext();
195
196 private static void checkPermission(String type) {
197 SecurityManager sm = System.getSecurityManager();
198 if (sm != null) {
199 sm.checkPermission(new AuthPermission
200 ("createLoginConfiguration." + type));
201 }
202 }
203
204 /**
205 * Sole constructor. (For invocation by subclass constructors, typically
|