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