Home » openejb-3.1.2-src » org.apache.openejb.ri » sp » [javadoc | source]

    1   /**
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *     http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   package org.apache.openejb.ri.sp;
   18   
   19   import org.apache.openejb.spi.SecurityService;
   20   import org.apache.openejb.InterfaceType;
   21   
   22   import javax.security.auth.login.LoginException;
   23   import java.util.Collection;
   24   import java.util.Set;
   25   import java.util.Collections;
   26   import java.security.Principal;
   27   import java.lang.reflect.Method;
   28   
   29   /**
   30    * @org.apache.xbean.XBean element="pseudoSecurityService"
   31    */
   32   public class PseudoSecurityService implements SecurityService {
   33       public PseudoSecurityService() {
   34           PseudoPolicyConfigurationFactory.install();
   35       }
   36   
   37       public void init(java.util.Properties props) {
   38       }
   39   
   40       public Object login(String user, String pass) throws LoginException {
   41           return null;
   42       }
   43   
   44       public Object login(String securityRealm, String user, String pass) throws LoginException {
   45           return null;
   46       }
   47   
   48       public Set<String> getLogicalRoles(Principal[] principals, Set<String> logicalRoles) {
   49           return Collections.emptySet();
   50       }
   51   
   52       public void associate(Object securityIdentity) throws LoginException {
   53       }
   54   
   55       public Object disassociate() {
   56           return null;
   57       }
   58   
   59       public void logout(Object securityIdentity) throws LoginException {
   60       }
   61   
   62       public boolean isCallerInRole(String role) {
   63           return false;
   64       }
   65   
   66       public Principal getCallerPrincipal() {
   67           return null;
   68       }
   69   
   70       public boolean isCallerAuthorized(Method method, InterfaceType type) {
   71           return true;
   72       }
   73   }

Home » openejb-3.1.2-src » org.apache.openejb.ri » sp » [javadoc | source]