Skip to content

Commit 5bd4db1

Browse files
committed
Use javadoc macro
Closes gh-15386
1 parent d6874d9 commit 5bd4db1

40 files changed

+182
-169
lines changed

docs/antora-playbook.yml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ asciidoc:
2424
extensions:
2525
- '@asciidoctor/tabs'
2626
- '@springio/asciidoctor-extensions'
27+
- '@springio/asciidoctor-extensions/javadoc-extension'
2728
urls:
2829
latest_version_segment_strategy: redirect:to
2930
latest_version_segment: ''

docs/antora.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ nav:
66
ext:
77
collector:
88
run:
9-
command: gradlew -q -PbuildSrc.skipTests=true "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :spring-security-docs:generateAntoraYml
9+
command: gradlew -q -PbuildSrc.skipTests=true :spring-security-docs:generateAntoraResources
1010
local: true
1111
scan:
1212
dir: ./build/generated-antora-resources

docs/modules/ROOT/nav.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* xref:migration/index.adoc[Migrating to 6.2]
99
** xref:migration/authorization.adoc[Authorization Changes]
1010
* xref:getting-spring-security.adoc[Getting Spring Security]
11+
* xref:attachment$api/java/index.html[Javadoc]
1112
* xref:features/index.adoc[Features]
1213
** xref:features/authentication/index.adoc[Authentication]
1314
*** xref:features/authentication/password-storage.adoc[Password Storage]

docs/modules/ROOT/pages/features/authentication/password-storage.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ With the above configuration, when a password manager navigates to `/.well-known
598598
There are some scenarios where you need to check whether a password has been compromised, for example, if you are creating an application that deals with sensitive data, it is often needed that you perform some check on user's passwords in order to assert its reliability.
599599
One of these checks can be if the password has been compromised, usually because it has been found in a https://wikipedia.org/wiki/Data_breach[data breach].
600600

601-
To facilitate that, Spring Security provides integration with the https://haveibeenpwned.com/API/v3#PwnedPasswords[Have I Been Pwned API] via the {security-api-url}org/springframework/security/core/password/HaveIBeenPwnedRestApiPasswordChecker.html[`HaveIBeenPwnedRestApiPasswordChecker` implementation] of the {security-api-url}org/springframework/security/core/password/CompromisedPasswordChecker.html[`CompromisedPasswordChecker` interface].
601+
To facilitate that, Spring Security provides integration with the https://haveibeenpwned.com/API/v3#PwnedPasswords[Have I Been Pwned API] via the javadoc:org.springframework.security.web.authentication.password.HaveIBeenPwnedRestApiPasswordChecker[] implementation of the javadoc:org.springframework.security.authentication.password.CompromisedPasswordChecker[] interface.
602602

603603
You can either use the `CompromisedPasswordChecker` API by yourself or, if you are using xref:servlet/authentication/passwords/dao-authentication-provider.adoc[the `DaoAuthenticationProvider]` via xref:servlet/authentication/passwords/index.adoc[Spring Security authentication mechanisms], you can provide a `CompromisedPasswordChecker` bean, and it will be automatically picked up by Spring Security configuration.
604604

docs/modules/ROOT/pages/features/integrations/cryptography.adoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ The code is distributed as part of the core module but has no dependencies on an
88

99
[[spring-security-crypto-encryption]]
1010
== Encryptors
11-
The {security-api-url}org/springframework/security/crypto/encrypt/Encryptors.html[`Encryptors`] class provides factory methods for constructing symmetric encryptors.
12-
This class lets you create {security-api-url}org/springframework/security/crypto/encrypt/BytesEncryptor.html[`BytesEncryptor`] instances to encrypt data in raw `byte[]` form.
13-
You can also construct {security-api-url}org/springframework/security/crypto/encrypt/TextEncryptor.html[TextEncryptor] instances to encrypt text strings.
11+
The javadoc:org.springframework.security.crypto.encrypt.Encryptors[] class provides factory methods for constructing symmetric encryptors.
12+
This class lets you create javadoc:org.springframework.security.crypto.encrypt.BytesEncryptor[] instances to encrypt data in raw `byte[]` form.
13+
You can also construct javadoc:org.springframework.security.crypto.encrypt.TextEncryptor[] instances to encrypt text strings.
1414
Encryptors are thread-safe.
1515

1616
[NOTE]
@@ -101,9 +101,9 @@ Encrypted results are returned as hex-encoded strings for easy storage on the fi
101101

102102
[[spring-security-crypto-keygenerators]]
103103
== Key Generators
104-
The {security-api-url}org/springframework/security/crypto/keygen/KeyGenerators.html[`KeyGenerators`] class provides a number of convenience factory methods for constructing different types of key generators.
105-
By using this class, you can create a {security-api-url}org/springframework/security/crypto/keygen/BytesKeyGenerator.html[`BytesKeyGenerator`] to generate `byte[]` keys.
106-
You can also construct a {security-api-url}org/springframework/security/crypto/keygen/StringKeyGenerator.html`[StringKeyGenerator]` to generate string keys.
104+
The javadoc:org.springframework.security.crypto.keygen.KeyGenerators[] class provides a number of convenience factory methods for constructing different types of key generators.
105+
By using this class, you can create a javadoc:org.springframework.security.crypto.keygen.BytesKeyGenerator[] to generate `byte[]` keys.
106+
You can also construct a javadoc:org.springframework.security.crypto.keygen.StringKeyGenerator[] to generate string keys.
107107
`KeyGenerators` is a thread-safe class.
108108

109109
=== BytesKeyGenerator

docs/modules/ROOT/pages/reactive/authentication/concurrent-sessions-control.adoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Similar to xref:servlet/authentication/session-management.adoc#ns-concurrent-sessions[Servlet's Concurrent Sessions Control], Spring Security also provides support to limit the number of concurrent sessions a user can have in a Reactive application.
55

66
When you set up Concurrent Sessions Control in Spring Security, it monitors authentications carried out through Form Login, xref:reactive/oauth2/login/index.adoc[OAuth 2.0 Login], and HTTP Basic authentication by hooking into the way those authentication mechanisms handle authentication success.
7-
More specifically, the session management DSL will add the {security-api-url}org/springframework/security/web/server/authentication/ConcurrentSessionControlServerAuthenticationSuccessHandler.html[ConcurrentSessionControlServerAuthenticationSuccessHandler] and the {security-api-url}org/springframework/security/web/server/authentication/RegisterSessionServerAuthenticationSuccessHandler.html[RegisterSessionServerAuthenticationSuccessHandler] to the list of `ServerAuthenticationSuccessHandler` used by the authentication filter.
7+
More specifically, the session management DSL will add the javadoc:org.springframework.security.web.server.authentication.ConcurrentSessionControlServerAuthenticationSuccessHandler[] and the javadoc:org.springframework.security.web.server.authentication.RegisterSessionServerAuthenticationSuccessHandler[] to the list of `ServerAuthenticationSuccessHandler` used by the authentication filter.
88

99
The following sections contains examples of how to configure Concurrent Sessions Control.
1010

@@ -197,9 +197,9 @@ If you also need to invalidate the session against the Identity Provider you mus
197197
[[concurrent-sessions-control-custom-strategy]]
198198
== Handling Maximum Number of Sessions Exceeded
199199

200-
By default, when the maximum number of sessions is exceeded, the least recently used session(s) will be expired by using the {security-api-url}org/springframework/security/web/server/authentication/session/InvalidateLeastUsedMaximumSessionsExceededHandler.html[InvalidateLeastUsedMaximumSessionsExceededHandler].
201-
Spring Security also provides another implementation that prevents the user from creating new sessions by using the {security-api-url}org/springframework/security/web/server/authentication/session/PreventLoginMaximumSessionsExceededHandler.html[PreventLoginMaximumSessionsExceededHandler].
202-
If you want to use your own strategy, you can provide a different implementation of {security-api-url}org/springframework/security/web/server/authentication/session/ServerMaximumSessionsExceededHandler.html[ServerMaximumSessionsExceededHandler].
200+
By default, when the maximum number of sessions is exceeded, the least recently used session(s) will be expired by using the javadoc:org.springframework.security.web.server.authentication.InvalidateLeastUsedServerMaximumSessionsExceededHandler[].
201+
Spring Security also provides another implementation that prevents the user from creating new sessions by using the javadoc:org.springframework.security.web.server.authentication.PreventLoginServerMaximumSessionsExceededHandler[].
202+
If you want to use your own strategy, you can provide a different implementation of javadoc:org.springframework.security.web.server.authentication.ServerMaximumSessionsExceededHandler[].
203203

204204
.Configuring maximumSessionsExceededHandler
205205
[tabs]
@@ -254,9 +254,9 @@ open fun reactiveSessionRegistry(): ReactiveSessionRegistry {
254254
[[reactive-concurrent-sessions-control-specify-session-registry]]
255255
== Specifying a `ReactiveSessionRegistry`
256256

257-
In order to keep track of the user's sessions, Spring Security uses a {security-api-url}org/springframework/security/core/session/ReactiveSessionRegistry.html[ReactiveSessionRegistry], and, every time a user logs in, their session information is saved.
257+
In order to keep track of the user's sessions, Spring Security uses a javadoc:org.springframework.security.core.session.ReactiveSessionRegistry[], and, every time a user logs in, their session information is saved.
258258

259-
Spring Security ships with {security-api-url}org/springframework/security/core/session/InMemoryReactiveSessionRegistry.html[InMemoryReactiveSessionRegistry] implementation of `ReactiveSessionRegistry`.
259+
Spring Security ships with javadoc:org.springframework.security.core.session.InMemoryReactiveSessionRegistry[] implementation of `ReactiveSessionRegistry`.
260260

261261
To specify a `ReactiveSessionRegistry` implementation you can either declare it as a bean:
262262

docs/modules/ROOT/pages/reactive/oauth2/resource-server/bearer-tokens.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ return http {
4141
== Bearer Token Propagation
4242

4343
Now that you have a bearer token, you can pass that to downstream services.
44-
This is possible with `{security-api-url}org/springframework/security/oauth2/server/resource/web/reactive/function/client/ServerBearerExchangeFilterFunction.html[ServerBearerExchangeFilterFunction]`:
44+
This is possible with javadoc:org.springframework.security.oauth2.server.resource.web.reactive.function.client.ServerBearerExchangeFilterFunction[]:
4545

4646
[tabs]
4747
======
@@ -70,7 +70,7 @@ fun rest(): WebClient {
7070
----
7171
======
7272

73-
When the `WebClient` shown in the preceding example performs requests, Spring Security looks up the current `Authentication` and extract any `{security-api-url}org/springframework/security/oauth2/core/AbstractOAuth2Token.html[AbstractOAuth2Token]` credential.
73+
When the `WebClient` shown in the preceding example performs requests, Spring Security looks up the current `Authentication` and extract any javadoc:org.springframework.security.oauth2.core.AbstractOAuth2Token[] credential.
7474
Then, it propagates that token in the `Authorization` header -- for example:
7575

7676
[tabs]

docs/modules/ROOT/pages/reactive/oauth2/resource-server/jwt.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ fun jwtDecoder(): ReactiveJwtDecoder {
234234

235235
[NOTE]
236236
====
237-
Calling `{security-api-url}org/springframework/security/oauth2/jwt/ReactiveJwtDecoders.html#fromIssuerLocation-java.lang.String-[ReactiveJwtDecoders#fromIssuerLocation]` invokes the Provider Configuration or Authorization Server Metadata endpoint to derive the JWK Set URI.
237+
Calling javadoc:org.springframework.security.oauth2.jwt.ReactiveJwtDecoders#fromIssuerLocation-java.lang.String-[ReactiveJwtDecoders#fromIssuerLocation] invokes the Provider Configuration or Authorization Server Metadata endpoint to derive the JWK Set URI.
238238
If the application does not expose a `ReactiveJwtDecoder` bean, Spring Boot exposes the above default one.
239239
====
240240

docs/modules/ROOT/pages/reactive/oauth2/resource-server/opaque-token.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Given an Opaque Token, Resource Server:
6868
. Inspects the response for an `{ 'active' : true }` attribute.
6969
. Maps each scope to an authority with a prefix of `SCOPE_`.
7070

71-
By default, the resulting `Authentication#getPrincipal` is a Spring Security `{security-api-url}org/springframework/security/oauth2/core/OAuth2AuthenticatedPrincipal.html[OAuth2AuthenticatedPrincipal]` object, and `Authentication#getName` maps to the token's `sub` property, if one is present.
71+
By default, the resulting `Authentication#getPrincipal` is a Spring Security javadoc:org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal[] object, and `Authentication#getName` maps to the token's `sub` property, if one is present.
7272

7373
From here, you may want to jump to:
7474

docs/modules/ROOT/pages/reactive/test/web/oauth2.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ client
956956
----
957957
======
958958

959-
You can also specify a complete `Jwt`, for which `{security-api-url}org/springframework/security/oauth2/jwt/Jwt.Builder.html[Jwt.Builder]` is quite handy:
959+
You can also specify a complete `Jwt`, for which javadoc:org.springframework.security.oauth2.jwt.Jwt$Builder[] is quite handy:
960960

961961
[tabs]
962962
======

docs/modules/ROOT/pages/servlet/architecture.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ image::{figures}/filterchainproxy.png[]
118118
[[servlet-securityfilterchain]]
119119
== SecurityFilterChain
120120

121-
{security-api-url}org/springframework/security/web/SecurityFilterChain.html[`SecurityFilterChain`] is used by <<servlet-filterchainproxy>> to determine which Spring Security `Filter` instances should be invoked for the current request.
121+
javadoc:org.springframework.security.web.SecurityFilterChain[] is used by <<servlet-filterchainproxy>> to determine which Spring Security `Filter` instances should be invoked for the current request.
122122

123123
The following image shows the role of `SecurityFilterChain`.
124124

@@ -392,7 +392,7 @@ public FilterRegistrationBean<TenantFilter> tenantFilterRegistration(TenantFilte
392392
== Handling Security Exceptions
393393

394394

395-
The {security-api-url}org/springframework/security/web/access/ExceptionTranslationFilter.html[`ExceptionTranslationFilter`] allows translation of {security-api-url}org/springframework/security/access/AccessDeniedException.html[`AccessDeniedException`] and {security-api-url}/org/springframework/security/core/AuthenticationException.html[`AuthenticationException`] into HTTP responses.
395+
The javadoc:org.springframework.security.web.access.ExceptionTranslationFilter[] allows translation of javadoc:org.springframework.security.access.AccessDeniedException[] and javadoc:org.springframework.security.core.AuthenticationException[] into HTTP responses.
396396

397397
`ExceptionTranslationFilter` is inserted into the <<servlet-filterchainproxy>> as one of the <<servlet-security-filters>>.
398398

@@ -447,7 +447,7 @@ In Spring Security this is done by saving the `HttpServletRequest` using a <<req
447447
[[requestcache]]
448448
=== RequestCache
449449

450-
The `HttpServletRequest` is saved in the {security-api-url}org/springframework/security/web/savedrequest/RequestCache.html[`RequestCache`].
450+
The `HttpServletRequest` is saved in the javadoc:org.springframework.security.web.savedrequest.RequestCache[].
451451
When the user successfully authenticates, the `RequestCache` is used to replay the original request.
452452
The <<requestcacheawarefilter,`RequestCacheAwareFilter`>> uses the `RequestCache` to get the saved `HttpServletRequest` after the user authenticates, while the `ExceptionTranslationFilter` uses the `RequestCache` to save the `HttpServletRequest` after it detects `AuthenticationException`, before redirecting the user to the login endpoint.
453453

@@ -463,7 +463,7 @@ There are a number of reasons you may want to not store the user's unauthenticat
463463
You may want to offload that storage onto the user's browser or store it in a database.
464464
Or you may want to shut off this feature since you always want to redirect the user to the home page instead of the page they tried to visit before login.
465465

466-
To do that, you can use {security-api-url}org/springframework/security/web/savedrequest/NullRequestCache.html[the `NullRequestCache` implementation].
466+
To do that, you can use the javadoc:org.springframework.security.web.savedrequest.NullRequestCache[NullRequestCache] implementation.
467467

468468
.Prevent the Request From Being Saved
469469
[tabs]
@@ -517,7 +517,7 @@ XML::
517517
[[requestcacheawarefilter]]
518518
=== RequestCacheAwareFilter
519519

520-
The {security-api-url}org/springframework/security/web/savedrequest/RequestCacheAwareFilter.html[`RequestCacheAwareFilter`] uses the <<requestcache,`RequestCache`>> to replay the original request.
520+
The javadoc:org.springframework.security.web.savedrequest.RequestCacheAwareFilter[] uses the <<requestcache,`RequestCache`>> to replay the original request.
521521

522522
[[servlet-logging]]
523523
== Logging

0 commit comments

Comments
 (0)