Skip to content

Commit 1a7435b

Browse files
committed
fix Javadoc
Signed-off-by: Kai Helbig <[email protected]>
1 parent 72aba3c commit 1a7435b

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
java-version: '8'
3838
- name: Build with Gradle
3939
run: ./gradlew build
40+
- name: Check Javadoc generation
41+
run: ./gradlew javadoc
4042
- name: Run integration tests
4143
run: ./gradlew e2e
4244
- name: Publish test report

mock/src/main/java/com/tngtech/keycloakmock/api/MockServerException.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
import javax.annotation.Nonnull;
44

5+
/** Runtime exception which is thrown when starting or stopping the mock fails */
56
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) {
78
super(message, cause);
89
}
910
}

mock/src/main/java/com/tngtech/keycloakmock/api/ServerConfig.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ public Set<String> getDefaultScopes() {
133133
return Collections.unmodifiableSet(defaultScopes);
134134
}
135135

136+
/**
137+
* Builder for {@link ServerConfig}.
138+
*
139+
* <p>Use this to generate a server configuration to your needs.
140+
*/
136141
public static final class Builder {
137142

138143
private int port = DEFAULT_PORT;
@@ -285,8 +290,10 @@ public Builder withResourceToMapRolesTo(@Nonnull String resource) {
285290
*
286291
* <p>Set of client scopes to be configured. Default scope 'openid' is always added.
287292
*
288-
* @param scopes as set
293+
* @param defaultScopes as set
289294
* @return builder
295+
* @see <a href="https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims">scope
296+
* claims</a>
290297
*/
291298
@Nonnull
292299
public Builder withDefaultScopes(@Nonnull final Set<String> defaultScopes) {
@@ -299,8 +306,10 @@ public Builder withDefaultScopes(@Nonnull final Set<String> defaultScopes) {
299306
*
300307
* <p>A client scope to be configured. Default scope 'openid' is always added.
301308
*
302-
* @param scope as string
309+
* @param defaultScope as string
303310
* @return builder
311+
* @see <a href="https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims">scope
312+
* claims</a>
304313
*/
305314
@Nonnull
306315
public Builder withDefaultScope(@Nonnull final String defaultScope) {

mock/src/main/java/com/tngtech/keycloakmock/api/TokenConfig.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ public Builder withScope(@Nonnull final String scope) {
426426
/**
427427
* Add scopes.
428428
*
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
430430
* in ServerConfig.
431431
*
432432
* @param scopes the scopes to add
@@ -735,6 +735,13 @@ public TokenConfig build() {
735735
}
736736
}
737737

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+
*/
738745
public static class Access {
739746

740747
@Nonnull private final Set<String> roles = new HashSet<>();

0 commit comments

Comments
 (0)