diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml index c04d9db43..42f845077 100644 --- a/docs/antora-playbook.yml +++ b/docs/antora-playbook.yml @@ -11,11 +11,11 @@ antora: - '@antora/atlas-extension' site: title: Spring Authorization Server - url: https://https://rwinch.github.io/spring-authorization-server/ + url: https://docs.spring.io/spring-authorization-server/ content: sources: - url: .. - branches: antora + branches: HEAD start_path: docs worktrees: true asciidoc: diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 7847ced05..ecbc3d534 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -1,4 +1,4 @@ -* xref:index.adoc[] +* xref:overview.adoc[] * xref:getting-help.adoc[] * xref:getting-started.adoc[] * xref:configuration-model.adoc[] diff --git a/docs/modules/ROOT/pages/getting-started.adoc b/docs/modules/ROOT/pages/getting-started.adoc index 75ec6bc4e..4f7ae90f4 100644 --- a/docs/modules/ROOT/pages/getting-started.adoc +++ b/docs/modules/ROOT/pages/getting-started.adoc @@ -88,7 +88,7 @@ If you want to customize the default configuration (regardless of whether you're These components can be defined as follows: -[[sample.gettingStarted]] +[[sample.gettingstarted]] .SecurityConfig.java [source,java] ---- diff --git a/docs/modules/ROOT/pages/guides/how-to-jpa.adoc b/docs/modules/ROOT/pages/guides/how-to-jpa.adoc index 876cf4419..907ec45c6 100644 --- a/docs/modules/ROOT/pages/guides/how-to-jpa.adoc +++ b/docs/modules/ROOT/pages/guides/how-to-jpa.adoc @@ -112,7 +112,7 @@ CREATE TABLE authorization ( === Authorization Consent Schema The xref:core-model-components.adoc#oauth2-authorization-consent[`OAuth2AuthorizationConsent`] domain object is the simplest to model and contains only a single multi-valued field in addition to a composite key. -The following listing shows the `authorizationConsent` schema. +The following listing shows the `authorizationconsent` schema. .Authorization Consent Schema [source,sql] @@ -167,11 +167,11 @@ include::{examples-dir}/main/java/sample/jpa/entity/authorization/Authorization. The following listing shows the `AuthorizationConsent` entity, which is used to persist information mapped from the xref:core-model-components.adoc#oauth2-authorization-consent[`OAuth2AuthorizationConsent`] domain object. -[[sample.jpa.entity.authorizationConsent]] +[[sample.jpa.entity.authorizationconsent]] .Authorization Consent Entity [source,java] ---- -include::{examples-dir}/main/java/sample/jpa/entity/authorizationConsent/AuthorizationConsent.java[] +include::{examples-dir}/main/java/sample/jpa/entity/authorizationconsent/AuthorizationConsent.java[] ---- [[create-spring-data-repositories]] @@ -213,11 +213,11 @@ include::{examples-dir}/main/java/sample/jpa/repository/authorization/Authorizat The following listing shows the `AuthorizationConsentRepository`, which is able to find and delete an xref:guides/how-to-jpa.adoc#authorization-consent-entity[`AuthorizationConsent`] by the `registeredClientId` and `principalName` fields that form a composite primary key. -[[sample.jpa.repository.authorizationConsent]] +[[sample.jpa.repository.authorizationconsent]] .Authorization Consent Repository [source,java] ---- -include::{examples-dir}/main/java/sample/jpa/repository/authorizationConsent/AuthorizationConsentRepository.java[] +include::{examples-dir}/main/java/sample/jpa/repository/authorizationconsent/AuthorizationConsentRepository.java[] ---- [[implement-core-services]] @@ -263,9 +263,9 @@ include::{examples-dir}/main/java/sample/jpa/service/authorization/JpaOAuth2Auth The following listing shows the `JpaOAuth2AuthorizationConsentService`, which uses an xref:guides/how-to-jpa.adoc#authorization-consent-repository[`AuthorizationConsentRepository`] for persisting an xref:guides/how-to-jpa.adoc#authorization-consent-entity[`AuthorizationConsent`] and maps to and from the xref:core-model-components.adoc#oauth2-authorization-consent[`OAuth2AuthorizationConsent`] domain object. -[[sample.jpa.service.authorizationConsent]] +[[sample.jpa.service.authorizationconsent]] .`OAuth2AuthorizationConsentService` Implementation [source,java] ---- -include::{examples-dir}/main/java/sample/jpa/service/authorizationConsent/JpaOAuth2AuthorizationConsentService.java[] +include::{examples-dir}/main/java/sample/jpa/service/authorizationconsent/JpaOAuth2AuthorizationConsentService.java[] ---- diff --git a/docs/modules/ROOT/pages/guides/how-to-userinfo.adoc b/docs/modules/ROOT/pages/guides/how-to-userinfo.adoc index 21166d5af..6f0e8a977 100644 --- a/docs/modules/ROOT/pages/guides/how-to-userinfo.adoc +++ b/docs/modules/ROOT/pages/guides/how-to-userinfo.adoc @@ -83,7 +83,7 @@ The following listing shows how to use the customization option that is availabl include::{examples-dir}/main/java/sample/userinfo/jwt/JwtUserInfoMapperSecurityConfig.java[] ---- -This configuration maps claims from the access token (which is a JWT when using the xref:getting-started.adoc#sample.gettingStarted[Getting Started config]) to populate the user info response and provides the following: +This configuration maps claims from the access token (which is a JWT when using the xref:getting-started.adoc#sample.gettingstarted[Getting Started config]) to populate the user info response and provides the following: <1> A Spring Security filter chain for the xref:{docs-dir}/protocol-endpoints.adoc[Protocol Endpoints]. <2> A user info mapper that maps claims in a domain-specific way. diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index dba5ab854..615419118 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -1,109 +1,12 @@ +:noheader: [[top]] -= Overview -:page-section-summary-toc: 1 -Joe Grandja, Steve Riesenberg -v{spring-authorization-server-version} -:docinfo: private-footer -:nofooter: - -This site contains reference documentation and how-to guides for Spring Authorization Server. += Spring Authorization Server Reference [horizontal] -xref:index.adoc#introducing-spring-authorization-server[Introduction] :: Introduction and feature list +xref:overview.adoc[Overview] :: Introduction and feature list xref:getting-help.adoc[Getting Help] :: Links to samples, questions and issues xref:getting-started.adoc[Getting Started] :: System requirements, dependencies and developing your first application xref:configuration-model.adoc[Configuration Model] :: Default configuration and customizing the configuration xref:core-model-components.adoc[Core Model / Components] :: Core domain model and component interfaces xref:protocol-endpoints.adoc[Protocol Endpoints] :: OAuth2 and OpenID Connect 1.0 protocol endpoint implementations xref:how-to.adoc[How-to Guides] :: Guides to get the most from Spring Authorization Server - - -[[introducing-spring-authorization-server]] -== Introducing Spring Authorization Server - -Spring Authorization Server is a framework that provides implementations of the https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07[OAuth 2.1] and https://openid.net/specs/openid-connect-core-1_0.html[OpenID Connect 1.0] specifications and other related specifications. -It is built on top of https://spring.io/projects/spring-security[Spring Security] to provide a secure, light-weight, and customizable foundation for building OpenID Connect 1.0 Identity Providers and OAuth2 Authorization Server products. - -[[feature-list]] -== Feature List - -Spring Authorization Server supports the following features: - -[cols="2a,4a,6a"] -|=== -|Category |Feature |Related specifications - -|xref:protocol-endpoints.adoc#oauth2-token-endpoint[Authorization Grant] -| -* Authorization Code -** xref:protocol-endpoints.adoc#oauth2-authorization-endpoint[User Consent] -* Client Credentials -* Refresh Token -* Device Code -** xref:protocol-endpoints.adoc#oauth2-device-verification-endpoint[User Consent] -| -* The OAuth 2.1 Authorization Framework (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07[draft]) -** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-4.1[Authorization Code Grant] -** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-4.2[Client Credentials Grant] -** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-4.3[Refresh Token Grant] -* OpenID Connect Core 1.0 (https://openid.net/specs/openid-connect-core-1_0.html[spec]) -** https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth[Authorization Code Flow] -* OAuth 2.0 Device Authorization Grant -(https://tools.ietf.org/html/rfc8628[spec]) -** https://tools.ietf.org/html/rfc8628#section-3[Device Flow] - -|xref:core-model-components.adoc#oauth2-token-generator[Token Formats] -| -* Self-contained (JWT) -* Reference (Opaque) -| -* JSON Web Token (JWT) (https://tools.ietf.org/html/rfc7519[RFC 7519]) -* JSON Web Signature (JWS) (https://tools.ietf.org/html/rfc7515[RFC 7515]) - -|xref:configuration-model.adoc#configuring-client-authentication[Client Authentication] -| -* `client_secret_basic` -* `client_secret_post` -* `client_secret_jwt` -* `private_key_jwt` -* `none` (public clients) -| -* The OAuth 2.1 Authorization Framework (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-2.4[Client Authentication]) -* JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication (https://tools.ietf.org/html/rfc7523[RFC 7523]) -* Proof Key for Code Exchange by OAuth Public Clients (PKCE) (https://tools.ietf.org/html/rfc7636[RFC 7636]) - -|xref:protocol-endpoints.adoc[Protocol Endpoints] -| -* xref:protocol-endpoints.adoc#oauth2-authorization-endpoint[OAuth2 Authorization Endpoint] -* xref:protocol-endpoints.adoc#oauth2-device-authorization-endpoint[OAuth2 Device Authorization Endpoint] -* xref:protocol-endpoints.adoc#oauth2-device-verification-endpoint[OAuth2 Device Verification Endpoint] -* xref:protocol-endpoints.adoc#oauth2-token-endpoint[OAuth2 Token Endpoint] -* xref:protocol-endpoints.adoc#oauth2-token-introspection-endpoint[OAuth2 Token Introspection Endpoint] -* xref:protocol-endpoints.adoc#oauth2-token-revocation-endpoint[OAuth2 Token Revocation Endpoint] -* xref:protocol-endpoints.adoc#oauth2-authorization-server-metadata-endpoint[OAuth2 Authorization Server Metadata Endpoint] -* xref:protocol-endpoints.adoc#jwk-set-endpoint[JWK Set Endpoint] -* xref:protocol-endpoints.adoc#oidc-provider-configuration-endpoint[OpenID Connect 1.0 Provider Configuration Endpoint] -* xref:protocol-endpoints.adoc#oidc-logout-endpoint[OpenID Connect 1.0 Logout Endpoint] -* xref:protocol-endpoints.adoc#oidc-user-info-endpoint[OpenID Connect 1.0 UserInfo Endpoint] -* xref:protocol-endpoints.adoc#oidc-client-registration-endpoint[OpenID Connect 1.0 Client Registration Endpoint] -| -* The OAuth 2.1 Authorization Framework (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07[draft]) -** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-3.1[Authorization Endpoint] -** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-3.2[Token Endpoint] -* OAuth 2.0 Device Authorization Grant (https://tools.ietf.org/html/rfc8628[RFC 8628]) -** https://tools.ietf.org/html/rfc8628#section-3.1[Device Authorization Endpoint] -** https://tools.ietf.org/html/rfc8628#section-3.3[Device Verification Endpoint] -* OAuth 2.0 Token Introspection (https://tools.ietf.org/html/rfc7662[RFC 7662]) -* OAuth 2.0 Token Revocation (https://tools.ietf.org/html/rfc7009[RFC 7009]) -* OAuth 2.0 Authorization Server Metadata (https://tools.ietf.org/html/rfc8414[RFC 8414]) -* JSON Web Key (JWK) (https://tools.ietf.org/html/rfc7517[RFC 7517]) -* OpenID Connect Discovery 1.0 (https://openid.net/specs/openid-connect-discovery-1_0.html[spec]) -** https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig[Provider Configuration Endpoint] -* OpenID Connect RP-Initiated Logout 1.0 (https://openid.net/specs/openid-connect-rpinitiated-1_0.html[spec]) -** https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RPLogout[Logout Endpoint] -* OpenID Connect Core 1.0 (https://openid.net/specs/openid-connect-core-1_0.html[spec]) -** https://openid.net/specs/openid-connect-core-1_0.html#UserInfo[UserInfo Endpoint] -* OpenID Connect Dynamic Client Registration 1.0 (https://openid.net/specs/openid-connect-registration-1_0.html[spec]) -** https://openid.net/specs/openid-connect-registration-1_0.html#ClientRegistration[Client Registration Endpoint] -** https://openid.net/specs/openid-connect-registration-1_0.html#ClientConfigurationEndpoint[Client Configuration Endpoint] -|=== diff --git a/docs/modules/ROOT/pages/overview.adoc b/docs/modules/ROOT/pages/overview.adoc new file mode 100644 index 000000000..2853bb4a3 --- /dev/null +++ b/docs/modules/ROOT/pages/overview.adoc @@ -0,0 +1,94 @@ +[[overview]] += Overview + +This site contains reference documentation and how-to guides for Spring Authorization Server. + +[[introducing-spring-authorization-server]] +== Introducing Spring Authorization Server + +Spring Authorization Server is a framework that provides implementations of the https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07[OAuth 2.1] and https://openid.net/specs/openid-connect-core-1_0.html[OpenID Connect 1.0] specifications and other related specifications. +It is built on top of https://spring.io/projects/spring-security[Spring Security] to provide a secure, light-weight, and customizable foundation for building OpenID Connect 1.0 Identity Providers and OAuth2 Authorization Server products. + +[[feature-list]] +== Feature List + +Spring Authorization Server supports the following features: + +[cols="2a,4a,6a"] +|=== +|Category |Feature |Related specifications + +|xref:protocol-endpoints.adoc#oauth2-token-endpoint[Authorization Grant] +| +* Authorization Code +** xref:protocol-endpoints.adoc#oauth2-authorization-endpoint[User Consent] +* Client Credentials +* Refresh Token +* Device Code +** xref:protocol-endpoints.adoc#oauth2-device-verification-endpoint[User Consent] +| +* The OAuth 2.1 Authorization Framework (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07[draft]) +** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-4.1[Authorization Code Grant] +** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-4.2[Client Credentials Grant] +** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-4.3[Refresh Token Grant] +* OpenID Connect Core 1.0 (https://openid.net/specs/openid-connect-core-1_0.html[spec]) +** https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth[Authorization Code Flow] +* OAuth 2.0 Device Authorization Grant +(https://tools.ietf.org/html/rfc8628[spec]) +** https://tools.ietf.org/html/rfc8628#section-3[Device Flow] + +|xref:core-model-components.adoc#oauth2-token-generator[Token Formats] +| +* Self-contained (JWT) +* Reference (Opaque) +| +* JSON Web Token (JWT) (https://tools.ietf.org/html/rfc7519[RFC 7519]) +* JSON Web Signature (JWS) (https://tools.ietf.org/html/rfc7515[RFC 7515]) + +|xref:configuration-model.adoc#configuring-client-authentication[Client Authentication] +| +* `client_secret_basic` +* `client_secret_post` +* `client_secret_jwt` +* `private_key_jwt` +* `none` (public clients) +| +* The OAuth 2.1 Authorization Framework (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-2.4[Client Authentication]) +* JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication (https://tools.ietf.org/html/rfc7523[RFC 7523]) +* Proof Key for Code Exchange by OAuth Public Clients (PKCE) (https://tools.ietf.org/html/rfc7636[RFC 7636]) + +|xref:protocol-endpoints.adoc[Protocol Endpoints] +| +* xref:protocol-endpoints.adoc#oauth2-authorization-endpoint[OAuth2 Authorization Endpoint] +* xref:protocol-endpoints.adoc#oauth2-device-authorization-endpoint[OAuth2 Device Authorization Endpoint] +* xref:protocol-endpoints.adoc#oauth2-device-verification-endpoint[OAuth2 Device Verification Endpoint] +* xref:protocol-endpoints.adoc#oauth2-token-endpoint[OAuth2 Token Endpoint] +* xref:protocol-endpoints.adoc#oauth2-token-introspection-endpoint[OAuth2 Token Introspection Endpoint] +* xref:protocol-endpoints.adoc#oauth2-token-revocation-endpoint[OAuth2 Token Revocation Endpoint] +* xref:protocol-endpoints.adoc#oauth2-authorization-server-metadata-endpoint[OAuth2 Authorization Server Metadata Endpoint] +* xref:protocol-endpoints.adoc#jwk-set-endpoint[JWK Set Endpoint] +* xref:protocol-endpoints.adoc#oidc-provider-configuration-endpoint[OpenID Connect 1.0 Provider Configuration Endpoint] +* xref:protocol-endpoints.adoc#oidc-logout-endpoint[OpenID Connect 1.0 Logout Endpoint] +* xref:protocol-endpoints.adoc#oidc-user-info-endpoint[OpenID Connect 1.0 UserInfo Endpoint] +* xref:protocol-endpoints.adoc#oidc-client-registration-endpoint[OpenID Connect 1.0 Client Registration Endpoint] +| +* The OAuth 2.1 Authorization Framework (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07[draft]) +** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-3.1[Authorization Endpoint] +** https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-3.2[Token Endpoint] +* OAuth 2.0 Device Authorization Grant (https://tools.ietf.org/html/rfc8628[RFC 8628]) +** https://tools.ietf.org/html/rfc8628#section-3.1[Device Authorization Endpoint] +** https://tools.ietf.org/html/rfc8628#section-3.3[Device Verification Endpoint] +* OAuth 2.0 Token Introspection (https://tools.ietf.org/html/rfc7662[RFC 7662]) +* OAuth 2.0 Token Revocation (https://tools.ietf.org/html/rfc7009[RFC 7009]) +* OAuth 2.0 Authorization Server Metadata (https://tools.ietf.org/html/rfc8414[RFC 8414]) +* JSON Web Key (JWK) (https://tools.ietf.org/html/rfc7517[RFC 7517]) +* OpenID Connect Discovery 1.0 (https://openid.net/specs/openid-connect-discovery-1_0.html[spec]) +** https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig[Provider Configuration Endpoint] +* OpenID Connect RP-Initiated Logout 1.0 (https://openid.net/specs/openid-connect-rpinitiated-1_0.html[spec]) +** https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RPLogout[Logout Endpoint] +* OpenID Connect Core 1.0 (https://openid.net/specs/openid-connect-core-1_0.html[spec]) +** https://openid.net/specs/openid-connect-core-1_0.html#UserInfo[UserInfo Endpoint] +* OpenID Connect Dynamic Client Registration 1.0 (https://openid.net/specs/openid-connect-registration-1_0.html[spec]) +** https://openid.net/specs/openid-connect-registration-1_0.html#ClientRegistration[Client Registration Endpoint] +** https://openid.net/specs/openid-connect-registration-1_0.html#ClientConfigurationEndpoint[Client Configuration Endpoint] +|=== diff --git a/docs/spring-authorization-server-docs.gradle b/docs/spring-authorization-server-docs.gradle index 76c4969c0..a494b7e42 100644 --- a/docs/spring-authorization-server-docs.gradle +++ b/docs/spring-authorization-server-docs.gradle @@ -1,7 +1,7 @@ plugins { id "io.spring.convention.docs" - id 'io.spring.antora.generate-antora-yml' version '0.0.1' - id 'org.antora' version '1.0.0' + id "io.spring.antora.generate-antora-yml" version "0.0.1" + id "org.antora" version "1.0.0" id "java" } @@ -10,11 +10,11 @@ version = project.rootProject.version sourceCompatibility = "17" antora { - playbook = 'cached-antora-playbook.yml' + playbook = "cached-antora-playbook.yml" playbookProvider { - repository = 'rwinch/spring-authorization-server' - branch = 'docs-build' - path = 'lib/antora/templates/per-branch-antora-playbook.yml' + repository = "spring-projects/spring-authorization-server" + branch = "docs-build" + path = "lib/antora/templates/per-branch-antora-playbook.yml" checkLocalBranch = true } options = [clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true] diff --git a/docs/src/docs/asciidoc/examples/spring-authorization-server-docs-examples.gradle b/docs/src/docs/asciidoc/examples/spring-authorization-server-docs-examples.gradle deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/src/docs/asciidoc/index-docinfo-footer.html b/docs/src/docs/asciidoc/index-docinfo-footer.html deleted file mode 100644 index 4eb8d2dd7..000000000 --- a/docs/src/docs/asciidoc/index-docinfo-footer.html +++ /dev/null @@ -1,8 +0,0 @@ -
diff --git a/docs/src/docs/asciidoc/index-docinfo.xml b/docs/src/docs/asciidoc/index-docinfo.xml deleted file mode 100644 index dadb4300f..000000000 --- a/docs/src/docs/asciidoc/index-docinfo.xml +++ /dev/null @@ -1,13 +0,0 @@ -