All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.shiro.realm.RealmFactory Maven / Gradle / Ivy

There is a newer version: 3.9
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.shiro.realm;

import java.util.Collection;

/**
 * Enables Shiro end-users to configure and initialize one or more {@link Realm Realm} instances
 * in any manner desired.
 * 

* This interface exists to support environments where end-users may not wish to use Shiro's default * text-based configuration to create and configure realms, and instead wish to retrieve a realm configured in a * proprietary manner. An implementation of this interface can access that proprietary mechanism to retrieve the * already-created Realms. * *

The Realm instances returned will used to construct the application's * {@link org.apache.shiro.mgt.SecurityManager SecurityManager} instance. * * @since 0.9 */ public interface RealmFactory { /** * Returns a collection of {@link Realm Realm} instances that will be used to construct * the application's SecurityManager instance. * *

The order of the collection is important. The {@link org.apache.shiro.mgt.SecurityManager SecurityManager} * implementation will consult the Realms during authentication (log-in) and authorization (access control) * operations in the collection's iteration order. That is, the resulting collection's * {@link java.util.Iterator Iterator} determines the order in which Realms are used. * * @return the Collection of Realms that the application's SecurityManager will use * for security data access. */ Collection getRealms(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy