Split out DefaultPasswordCredentials
[netconf.git] / plugins / netconf-auth-aaa / src / main / java / org / opendaylight / netconf / auth / aaa / DefaultPasswordCredentials.java
1 /*
2  * Copyright (c) 2023 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.netconf.auth.aaa;
9
10 import org.opendaylight.aaa.api.PasswordCredentials;
11
12 final class DefaultPasswordCredentials implements PasswordCredentials {
13     private final String username;
14     private final String password;
15
16     DefaultPasswordCredentials(final String username, final String password) {
17         this.username = username;
18         this.password = password;
19     }
20
21     @Override
22     public String username() {
23         return username;
24     }
25
26     @Override
27     public String password() {
28         return password;
29     }
30
31     @Override
32     public String domain() {
33         // If this is left null, default "sdn" domain is assumed
34         return null;
35     }
36 }