File tree 4 files changed +23
-4
lines changed
mock/src/main/java/com/tngtech/keycloakmock/api
4 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 37
37
java-version : ' 8'
38
38
- name : Build with Gradle
39
39
run : ./gradlew build
40
+ - name : Check Javadoc generation
41
+ run : ./gradlew javadoc
40
42
- name : Run integration tests
41
43
run : ./gradlew e2e
42
44
- name : Publish test report
Original file line number Diff line number Diff line change 2
2
3
3
import javax .annotation .Nonnull ;
4
4
5
+ /** Runtime exception which is thrown when starting or stopping the mock fails */
5
6
public class MockServerException extends RuntimeException {
6
- public MockServerException (@ Nonnull final String message , @ Nonnull final Throwable cause ) {
7
+ MockServerException (@ Nonnull final String message , @ Nonnull final Throwable cause ) {
7
8
super (message , cause );
8
9
}
9
10
}
Original file line number Diff line number Diff line change @@ -133,6 +133,11 @@ public Set<String> getDefaultScopes() {
133
133
return Collections .unmodifiableSet (defaultScopes );
134
134
}
135
135
136
+ /**
137
+ * Builder for {@link ServerConfig}.
138
+ *
139
+ * <p>Use this to generate a server configuration to your needs.
140
+ */
136
141
public static final class Builder {
137
142
138
143
private int port = DEFAULT_PORT ;
@@ -285,8 +290,10 @@ public Builder withResourceToMapRolesTo(@Nonnull String resource) {
285
290
*
286
291
* <p>Set of client scopes to be configured. Default scope 'openid' is always added.
287
292
*
288
- * @param scopes as set
293
+ * @param defaultScopes as set
289
294
* @return builder
295
+ * @see <a href="https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims">scope
296
+ * claims</a>
290
297
*/
291
298
@ Nonnull
292
299
public Builder withDefaultScopes (@ Nonnull final Set <String > defaultScopes ) {
@@ -299,8 +306,10 @@ public Builder withDefaultScopes(@Nonnull final Set<String> defaultScopes) {
299
306
*
300
307
* <p>A client scope to be configured. Default scope 'openid' is always added.
301
308
*
302
- * @param scope as string
309
+ * @param defaultScope as string
303
310
* @return builder
311
+ * @see <a href="https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims">scope
312
+ * claims</a>
304
313
*/
305
314
@ Nonnull
306
315
public Builder withDefaultScope (@ Nonnull final String defaultScope ) {
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ public Builder withScope(@Nonnull final String scope) {
426
426
/**
427
427
* Add scopes.
428
428
*
429
- * <p>The scope for which this token has been requested. Always contains the scopes configured
429
+ * <p>The scopes for which this token has been requested. Always contains the scopes configured
430
430
* in ServerConfig.
431
431
*
432
432
* @param scopes the scopes to add
@@ -735,6 +735,13 @@ public TokenConfig build() {
735
735
}
736
736
}
737
737
738
+ /**
739
+ * A container for realm or resource roles, to be used in claims {@code realm_access} or {@code
740
+ * resource_access}.
741
+ *
742
+ * @see Builder#withRealmRole(String)
743
+ * @see Builder#withResourceRole(String, String)
744
+ */
738
745
public static class Access {
739
746
740
747
@ Nonnull private final Set <String > roles = new HashSet <>();
You can’t perform that action at this time.
0 commit comments