01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: */package org.apache.openejb.ri.sp;
17:
18: import org.apache.openejb.spi.SecurityService;
19: import org.apache.openejb.InterfaceType;
20:
21: import javax.security.auth.login.LoginException;
22: import java.util.Collection;
23: import java.util.Set;
24: import java.util.Collections;
25: import java.security.Principal;
26: import java.lang.reflect.Method;
27:
28: /**
29: * @org.apache.xbean.XBean element="pseudoSecurityService"
30: */
31: public class PseudoSecurityService implements SecurityService {
32: public PseudoSecurityService() {
33: PseudoPolicyConfigurationFactory.install();
34: }
35:
36: public void init(java.util.Properties props) {
37: }
38:
39: public Object login(String user, String pass) throws LoginException {
40: return null;
41: }
42:
43: public Object login(String securityRealm, String user, String pass)
44: throws LoginException {
45: return null;
46: }
47:
48: public Set<String> getLogicalRoles(Principal[] principals,
49: Set<String> logicalRoles) {
50: return Collections.emptySet();
51: }
52:
53: public void associate(Object securityIdentity)
54: throws LoginException {
55: }
56:
57: public Object disassociate() {
58: return null;
59: }
60:
61: public void logout(Object securityIdentity) throws LoginException {
62: }
63:
64: public boolean isCallerInRole(String role) {
65: return false;
66: }
67:
68: public Principal getCallerPrincipal() {
69: return null;
70: }
71:
72: public boolean isCallerAuthorized(Method method, InterfaceType type) {
73: return true;
74: }
75: }
|