Skip to content

Fix :spring-authorization-server-docs:asciidoctor cacheability #1231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ private void configureAsciidoctorExtension(AbstractAsciidoctorTask asciidoctorTa
// Not using intermediateWorkDir.
// See https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/523
resourcesSrcDirSpec.include("images/*.png", "css/**", "js/**", "**/*.java");
// This exclusion is required to allow cacheability of :spring-authorization-server-docs:asciidoctor
// The whole docs/src/docs/asciidoc folder is being passed as a task input
resourcesSrcDirSpec.exclude("**/examples/build/**");
});
});
if (asciidoctorTask instanceof AsciidoctorTask) {
Expand Down
3 changes: 0 additions & 3 deletions docs/spring-authorization-server-docs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ asciidoctor {
"spring-security-reference-base-url": "https://docs.spring.io/spring-security/reference",
"spring-security-api-base-url": "https://docs.spring.io/spring-security/site/docs/current/api",
"spring-boot-reference-base-url": "https://docs.spring.io/spring-boot/docs/current/reference/html",
"examples-dir": "examples",
"samples-dir": "$rootDir/samples",
"docs-java": "$sourceDir/examples/src/main/java",
"chomp": "default headers packages",
"toc": "left",
"toclevels": "4"
Expand Down
3 changes: 3 additions & 0 deletions docs/src/docs/asciidoc/attributes.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:examples-dir: examples
:samples-dir: ../../../../samples
:docs-java: {docdir}/examples/src/main/java
2 changes: 2 additions & 0 deletions docs/src/docs/asciidoc/getting-started.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include::attributes.adoc[]

[[getting-started]]
= Getting Started

Expand Down
3 changes: 3 additions & 0 deletions docs/src/docs/asciidoc/guides/attributes.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:examples-dir: ../examples
:samples-dir: ../../../../../samples
:docs-java: {docdir}/examples/src/main/java
3 changes: 2 additions & 1 deletion docs/src/docs/asciidoc/guides/how-to-ext-grant-type.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
include::attributes.adoc[]

[[how-to-extension-grant-type]]
= How-to: Implement an Extension Authorization Grant Type
:index-link: ../how-to.html
:docs-dir: ..
:examples-dir: {docs-dir}/examples

This guide shows how to extend xref:{docs-dir}/index.adoc#top[Spring Authorization Server] with an https://datatracker.ietf.org/doc/html/rfc6749#section-4.5[extension authorization grant type].
The purpose of this guide is to demonstrate how to implement an extension authorization grant type and configure it at the xref:{docs-dir}/protocol-endpoints.adoc#oauth2-token-endpoint[OAuth2 Token endpoint].
Expand Down
2 changes: 2 additions & 0 deletions docs/src/docs/asciidoc/guides/how-to-jpa.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include::attributes.adoc[]

[[how-to-jpa]]
= How-to: Implement core services with JPA
:index-link: ../how-to.html
Expand Down
3 changes: 2 additions & 1 deletion docs/src/docs/asciidoc/guides/how-to-pkce.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
include::attributes.adoc[]

[[how-to-pkce]]
= How-to: Authenticate using a Single Page Application with PKCE
:index-link: ../how-to.html
:docs-dir: ..
:examples-dir: {docs-dir}/examples

This guide shows how to configure xref:{docs-dir}/index.adoc#top[Spring Authorization Server] to support a Single Page Application (SPA) with Proof Key for Code Exchange (PKCE).
The purpose of this guide is to demonstrate how to support a public client and require PKCE for client authentication.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/guides/how-to-social-login.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include::attributes.adoc[]

[[how-to-social-login]]
= How-to: Authenticate using Social Login
:index-link: ../how-to.html
:docs-dir: ..
:examples-dir: {docs-dir}/examples
:samples-dir: {docs-dir}/../../../../samples
:github-ref: main
:github-base-url: https://github.com/spring-projects/spring-authorization-server/blob/{github-ref}

Expand Down
2 changes: 2 additions & 0 deletions docs/src/docs/asciidoc/guides/how-to-userinfo.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include::attributes.adoc[]

[[how-to-userinfo]]
= How-to: Customize the OpenID Connect 1.0 UserInfo response
:index-link: ../how-to.html
Expand Down
2 changes: 2 additions & 0 deletions docs/src/docs/asciidoc/how-to.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include::attributes.adoc[]

[[how-to]]
= How-to Guides

Expand Down