2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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
8 package org.opendaylight.netconf.authprovider;
10 import org.opendaylight.aaa.api.PasswordCredentialAuth;
11 import org.opendaylight.netconf.auth.AuthProvider;
12 import org.osgi.service.component.annotations.Activate;
13 import org.osgi.service.component.annotations.Component;
14 import org.osgi.service.component.annotations.Deactivate;
15 import org.osgi.service.component.annotations.Reference;
17 @Component(immediate = true, property = "type=netconf-auth-provider")
18 // FIXME: merge with CredentialServiceAuthProvider once we have OSGi R7
19 public final class OSGiCredentialServiceAuthProvider implements AuthProvider {
21 PasswordCredentialAuth credService;
23 private CredentialServiceAuthProvider delegate = null;
26 public boolean authenticated(final String username, final String password) {
27 return delegate.authenticated(username, password);
32 delegate = new CredentialServiceAuthProvider(credService);