01: /*
02: * $Id: SecurityManager.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.api.security;
12:
13: import org.mule.api.EncryptionStrategy;
14: import org.mule.api.lifecycle.Initialisable;
15:
16: import java.util.Collection;
17:
18: /**
19: * <code>SecurityManager</code> is responsible for managing one or more
20: * security providers.
21: */
22:
23: public interface SecurityManager extends Initialisable {
24:
25: Authentication authenticate(Authentication authentication)
26: throws SecurityException, SecurityProviderNotFoundException;
27:
28: void addProvider(SecurityProvider provider);
29:
30: SecurityProvider getProvider(String name);
31:
32: SecurityProvider removeProvider(String name);
33:
34: Collection getProviders();
35:
36: void setProviders(Collection providers);
37:
38: SecurityContext createSecurityContext(Authentication authentication)
39: throws UnknownAuthenticationTypeException;
40:
41: EncryptionStrategy getEncryptionStrategy(String name);
42:
43: void addEncryptionStrategy(EncryptionStrategy strategy);
44:
45: EncryptionStrategy removeEncryptionStrategy(String name);
46:
47: Collection getEncryptionStrategies();
48:
49: void setEncryptionStrategies(Collection strategies);
50:
51: }
|