Skip to content

Package: MfaOptionCreatorImpl

MfaOptionCreatorImpl

nameinstructionbranchcomplexitylinemethod
MfaOptionCreatorImpl(KapuaId)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
MfaOptionCreatorImpl(KapuaId, KapuaId, String)
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getMfaSecretKey()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getUserId()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setMfaSecretKey(String)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setUserId(KapuaId)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2020, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.authentication.credential.mfa.shiro;
14:
15: import org.eclipse.kapua.commons.model.AbstractKapuaEntityCreator;
16: import org.eclipse.kapua.model.id.KapuaId;
17: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOption;
18: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOptionCreator;
19:
20: /**
21: * {@link MfaOption} creator implementation.
22: */
23: public class MfaOptionCreatorImpl extends AbstractKapuaEntityCreator<MfaOption> implements MfaOptionCreator {
24:
25: private static final long serialVersionUID = -4619585500941519330L;
26:
27: private KapuaId userId;
28: private String mfaSecretKey;
29:
30: /**
31: * Constructor
32: *
33: * @param scopeId scope identifier
34: * @param userId user identifier
35: * @param mfaSecretKey the secret key
36: */
37: public MfaOptionCreatorImpl(KapuaId scopeId, KapuaId userId, String mfaSecretKey) {
38: super(scopeId);
39: this.userId = userId;
40: this.mfaSecretKey = mfaSecretKey;
41: }
42:
43: public MfaOptionCreatorImpl(KapuaId scopeId) {
44: super(scopeId);
45: }
46:
47: @Override
48: public KapuaId getUserId() {
49: return userId;
50: }
51:
52: @Override
53: public void setUserId(KapuaId userId) {
54: this.userId = userId;
55: }
56:
57: @Override
58: public String getMfaSecretKey() {
59: return mfaSecretKey;
60: }
61:
62: @Override
63: public void setMfaSecretKey(String mfaSecretKey) {
64: this.mfaSecretKey = mfaSecretKey;
65: }
66: }