/xservices/trunk/src/java/net/brutex/xservices/security/SecurityManager.java |
---|
0,0 → 1,25 |
/* |
* Copyright 2012 Brian Rosenberger (Brutex Network) |
* |
* Licensed 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 net.brutex.xservices.security; |
import java.lang.reflect.Method; |
public interface SecurityManager { |
public boolean canExecute(String method, Identity identity); |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/xservices/trunk/src/java/net/brutex/xservices/security/StandardSecurityManager.java |
---|
0,0 → 1,13 |
package net.brutex.xservices.security; |
import java.lang.reflect.Method; |
public class StandardSecurityManager implements SecurityManager { |
@Override |
public boolean canExecute(String method, Identity identity) { |
System.out.println("User '"+identity.getUUID()+"' accesses '"+method+"'"); |
return true; |
} |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/xservices/trunk/src/java/net/brutex/xservices/security/UserIdentity.java |
---|
0,0 → 1,12 |
package net.brutex.xservices.security; |
import java.util.UUID; |
public class UserIdentity implements Identity { |
@Override |
public UUID getUUID() { |
return UUID.randomUUID(); |
} |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/xservices/trunk/src/java/net/brutex/xservices/security/Identity.java |
---|
0,0 → 1,28 |
/* |
* Copyright 2012 Brian Rosenberger (Brutex Network) |
* |
* Licensed 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 net.brutex.xservices.security; |
import java.util.UUID; |
public interface Identity { |
public UUID getUUID(); |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |