forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DevUiConfig.java
76 lines (63 loc) · 2.03 KB
/
DevUiConfig.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package io.quarkus.oidc.deployment;
import java.time.Duration;
import java.util.Map;
import java.util.Optional;
import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
@ConfigGroup
public class DevUiConfig {
/**
* Grant type which affects how OpenId Connect Dev UI will facilitate the token acquisition.
*
* For example: if the grant type is 'code' then an authorization code will be returned directly to Dev UI which will use a
* code
* handler to acquire the tokens while a username and password will have to be entered to request a token using a
* 'password' grant.
*/
public Grant grant = new Grant();
@ConfigGroup
public static class Grant {
public static enum Type {
/**
* 'client_credentials' grant
*/
CLIENT("client_credentials"),
/**
* 'password' grant
*/
PASSWORD("password"),
/**
* 'authorization_code' grant
*/
CODE("code"),
/**
* 'implicit' grant
*/
IMPLICIT("implicit");
private String grantType;
private Type(String grantType) {
this.grantType = grantType;
}
public String getGrantType() {
return grantType;
}
}
/**
* Grant type which will be used to acquire a token to test the OIDC 'service' applications
*/
@ConfigItem
public Optional<Type> type;
}
/**
* Grant options
*/
@ConfigItem
public Map<String, Map<String, String>> grantOptions;
/**
* The WebClient timeout.
* Use this property to configure how long an HTTP client used by Dev UI handlers will wait for a response when requesting
* tokens from OpenId Connect Provider and sending them to the service endpoint.
*/
@ConfigItem(defaultValue = "4S")
public Duration webClientTimeout;
}