|
1 | 1 | /*
|
2 |
| - * Copyright 2020 the original author or authors. |
| 2 | + * Copyright 2020-2021 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
28 | 28 | public class ClientSettings extends Settings {
|
29 | 29 | private static final String CLIENT_SETTING_BASE = "setting.client.";
|
30 | 30 | public static final String REQUIRE_PROOF_KEY = CLIENT_SETTING_BASE.concat("require-proof-key");
|
31 |
| - public static final String REQUIRE_USER_CONSENT = CLIENT_SETTING_BASE.concat("require-user-consent"); |
| 31 | + public static final String REQUIRE_AUTHORIZATION_CONSENT = CLIENT_SETTING_BASE.concat("require-authorization-consent"); |
32 | 32 |
|
33 | 33 | /**
|
34 | 34 | * Constructs a {@code ClientSettings}.
|
@@ -69,31 +69,31 @@ public ClientSettings requireProofKey(boolean requireProofKey) {
|
69 | 69 | }
|
70 | 70 |
|
71 | 71 | /**
|
72 |
| - * Returns {@code true} if the user's consent is required when the client requests access. |
| 72 | + * Returns {@code true} if authorization consent is required when the client requests access. |
73 | 73 | * The default is {@code false}.
|
74 | 74 | *
|
75 |
| - * @return {@code true} if the user's consent is required when the client requests access, {@code false} otherwise |
| 75 | + * @return {@code true} if authorization consent is required when the client requests access, {@code false} otherwise |
76 | 76 | */
|
77 |
| - public boolean requireUserConsent() { |
78 |
| - return setting(REQUIRE_USER_CONSENT); |
| 77 | + public boolean requireAuthorizationConsent() { |
| 78 | + return setting(REQUIRE_AUTHORIZATION_CONSENT); |
79 | 79 | }
|
80 | 80 |
|
81 | 81 | /**
|
82 |
| - * Set to {@code true} if the user's consent is required when the client requests access. |
| 82 | + * Set to {@code true} if authorization consent is required when the client requests access. |
83 | 83 | * This applies to all interactive flows (e.g. {@code authorization_code} and {@code device_code}).
|
84 | 84 | *
|
85 |
| - * @param requireUserConsent {@code true} if the user's consent is required when the client requests access, {@code false} otherwise |
| 85 | + * @param requireAuthorizationConsent {@code true} if authorization consent is required when the client requests access, {@code false} otherwise |
86 | 86 | * @return the {@link ClientSettings}
|
87 | 87 | */
|
88 |
| - public ClientSettings requireUserConsent(boolean requireUserConsent) { |
89 |
| - setting(REQUIRE_USER_CONSENT, requireUserConsent); |
| 88 | + public ClientSettings requireAuthorizationConsent(boolean requireAuthorizationConsent) { |
| 89 | + setting(REQUIRE_AUTHORIZATION_CONSENT, requireAuthorizationConsent); |
90 | 90 | return this;
|
91 | 91 | }
|
92 | 92 |
|
93 | 93 | protected static Map<String, Object> defaultSettings() {
|
94 | 94 | Map<String, Object> settings = new HashMap<>();
|
95 | 95 | settings.put(REQUIRE_PROOF_KEY, false);
|
96 |
| - settings.put(REQUIRE_USER_CONSENT, false); |
| 96 | + settings.put(REQUIRE_AUTHORIZATION_CONSENT, false); |
97 | 97 | return settings;
|
98 | 98 | }
|
99 | 99 | }
|
0 commit comments