Skip to content

Package: ShiroSessionKeys

ShiroSessionKeys

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2021, 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.shiro.session;
14:
15: import org.apache.shiro.session.Session;
16: import org.eclipse.kapua.service.account.Account;
17: import org.eclipse.kapua.service.user.User;
18:
19: /**
20: * {@link Session#getAttribute(Object)} keys.
21: *
22: * @since 1.6.0
23: */
24: public class ShiroSessionKeys {
25:
26: /**
27: * Constructor.
28: *
29: * @since 1.6.0
30: */
31: private ShiroSessionKeys() {
32: }
33:
34: /**
35: * The {@link Account#getId()}.
36: *
37: * @since 1.0.0
38: */
39: public static final String SCOPE_ID = "scopeId";
40:
41: /**
42: * The {@link Account#getName()}.
43: *
44: * @since 1.6.0
45: */
46: public static final String ACCOUNT_NAME = "scopeName";
47:
48: /**
49: * The {@link User#getId()}.
50: *
51: * @since 1.0.0
52: */
53: public static final String USER_ID = "userId";
54:
55: /**
56: * The {@link User#getName()}.
57: *
58: * @since 1.6.0
59: */
60: public static final String USER_NAME = "userName";
61: }