Skip to content

Package: DisplayType

DisplayType

nameinstructionbranchcomplexitylinemethod
fromString(String)
M: 13 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 27 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
3: *
4: * This program and the accompanying materials are made available under the
5: * terms of the Eclipse Public License v. 2.0, which is available at
6: * http://www.eclipse.org/legal/epl-2.0.
7: *
8: * This Source Code may also be made available under the following Secondary
9: * Licenses when the conditions for such availability set forth in the
10: * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
11: * version 2 with the GNU Classpath Exception, which is available at
12: * https://www.gnu.org/software/classpath/license.html.
13: *
14: * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15: *
16: */
17:
18: /*
19: *
20: * Contributors:
21: * 2021 : Payara Foundation and/or its affiliates
22: * Initially authored in Security Connectors
23: */
24: package jakarta.security.enterprise.authentication.mechanism.http.openid;
25:
26: import static java.util.Objects.isNull;
27:
28: /**
29: * Display specifies how the Authorization Server displays the authentication
30: * and consent user interface pages to the End-User.
31: *
32: * @author Gaurav Gupta
33: */
34: public enum DisplayType {
35:
36: /**
37: * The Authorization Server should display authentication and consent UI
38: * consistent with a full User-Agent page view. If the display parameter is
39: * not specified this is the default display mode.
40: *
41: */
42: PAGE,
43: /**
44: * The Authorization Server should display authentication and consent UI
45: * consistent with a popup User-Agent window.
46: *
47: */
48: POPUP,
49: /**
50: * The Authorization Server should display authentication and consent UI
51: * consistent with a device that leverages a touch interface.
52: *
53: */
54: TOUCH,
55: /**
56: * The Authorization Server should display authentication and consent UI
57: * consistent with a "feature phone" type display.
58: *
59: */
60: WAP;
61:
62: public static DisplayType fromString(String key) {
63:• return isNull(key) || key.trim().isEmpty() ? null : valueOf(key.toUpperCase());
64: }
65:
66: }