2 * Copyright (c) 2014, 2015 Hewlett-Packard Development Company, L.P. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.aaa.sts;
11 import org.apache.felix.dm.DependencyActivatorBase;
12 import org.apache.felix.dm.DependencyManager;
13 import org.opendaylight.aaa.api.AuthenticationService;
14 import org.opendaylight.aaa.api.ClaimAuth;
15 import org.opendaylight.aaa.api.ClientService;
16 import org.opendaylight.aaa.api.CredentialAuth;
17 import org.opendaylight.aaa.api.IdMService;
18 import org.opendaylight.aaa.api.TokenAuth;
19 import org.opendaylight.aaa.api.TokenStore;
20 import org.osgi.framework.BundleContext;
23 * An activator for the secure token server to inject in a
24 * {@link CredentialAuth} implementation.
29 public class Activator extends DependencyActivatorBase {
32 public void init(BundleContext context, DependencyManager manager)
34 manager.add(createComponent()
35 .setImplementation(ServiceLocator.INSTANCE)
36 .add(createServiceDependency().setService(CredentialAuth.class)
38 .setCallbacks("credentialAuthAdded", "credentialAuthRemoved"))
39 .add(createServiceDependency().setService(ClaimAuth.class)
41 .setCallbacks("claimAuthAdded", "claimAuthRemoved"))
42 .add(createServiceDependency().setService(TokenAuth.class)
44 .setCallbacks("tokenAuthAdded", "tokenAuthRemoved"))
45 .add(createServiceDependency().setService(TokenStore.class)
47 .setCallbacks("tokenStoreAdded", "tokenStoreRemoved"))
48 .add(createServiceDependency().setService(TokenStore.class)
50 .add(createServiceDependency().setService(
51 AuthenticationService.class).setRequired(true)
52 .setCallbacks("authenticationServiceAdded", "authenticationServiceRemoved"))
53 .add(createServiceDependency().setService(IdMService.class)
55 .add(createServiceDependency().setService(ClientService.class)
60 public void destroy(BundleContext context, DependencyManager manager)