Skip to content

Commit e74be27

Browse files
committed
feat: 1.0.x
1 parent 84727b2 commit e74be27

File tree

52 files changed

+244
-232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+244
-232
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 38 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -6,120 +6,50 @@ on:
66
- '**'
77
schedule:
88
- cron: '0 10 * * *' # Once per day at 10am UTC
9-
10-
env:
11-
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-authorization-server' }}
9+
workflow_dispatch:
1210

1311
jobs:
14-
prerequisites:
15-
name: Pre-requisites for building
16-
runs-on: ubuntu-latest
17-
outputs:
18-
runjobs: ${{ steps.continue.outputs.runjobs }}
19-
project_version: ${{ steps.continue.outputs.project_version }}
20-
steps:
21-
- uses: actions/checkout@v3
22-
- id: continue
23-
name: Determine if should continue
24-
if: env.RUN_JOBS == 'true'
25-
run: |
26-
# Run jobs if in upstream repository
27-
echo "runjobs=true" >> $GITHUB_OUTPUT
28-
# Extract version from gradle.properties
29-
version=$(cat gradle.properties | grep "version=" | awk -F'=' '{print $2}')
30-
echo "project_version=$version" >> $GITHUB_OUTPUT
3112
build:
3213
name: Build
33-
needs: [prerequisites]
14+
uses: spring-io/spring-security-release-tools/.github/workflows/build.yml@v1
3415
strategy:
3516
matrix:
3617
os: [ubuntu-latest, windows-latest]
37-
jdk: [8,11,17]
38-
include:
39-
- jdk: 8
40-
distribution: adopt
41-
- jdk: 11
42-
distribution: adopt
43-
- jdk: 17
44-
distribution: temurin
45-
fail-fast: false
46-
runs-on: ${{ matrix.os }}
47-
if: needs.prerequisites.outputs.runjobs
48-
steps:
49-
- uses: actions/checkout@v3
50-
- name: Set up JDK ${{ matrix.jdk }}
51-
uses: spring-io/spring-gradle-build-action@v2
52-
with:
53-
java-version: ${{ matrix.jdk }}
54-
distribution: ${{ matrix.distribution }}
55-
- name: Build with Gradle
56-
env:
57-
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
58-
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
59-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
60-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
61-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
62-
run: ./gradlew clean build --continue -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD"
63-
snapshot_tests:
64-
name: Test against snapshots
65-
needs: [prerequisites]
66-
runs-on: ubuntu-latest
67-
if: needs.prerequisites.outputs.runjobs
68-
steps:
69-
- uses: actions/checkout@v3
70-
- name: Set up JDK
71-
uses: spring-io/spring-gradle-build-action@v2
72-
with:
73-
java-version: 8
74-
distribution: adopt
75-
- name: Snapshot Tests
76-
env:
77-
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
78-
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
79-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
80-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
81-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
82-
run: ./gradlew test --refresh-dependencies -Duser.name=spring-builds+github -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PforceMavenRepositories=snapshot -PspringFrameworkVersion='5.3.+' -PspringSecurityVersion='5.8.+' -PlocksDisabled --stacktrace
83-
deploy_artifacts:
18+
jdk: [11]
19+
with:
20+
runs-on: ${{ matrix.os }}
21+
java-version: ${{ matrix.jdk }}
22+
distribution: temurin
23+
secrets: inherit
24+
test:
25+
name: Test Against Snapshots
26+
uses: spring-io/spring-security-release-tools/.github/workflows/test.yml@v1
27+
with:
28+
test-args: --refresh-dependencies --stacktrace -PforceMavenRepositories=snapshot -PspringFrameworkVersion=6.0.+ -PspringSecurityVersion=6.0.+
29+
secrets: inherit
30+
deploy-artifacts:
8431
name: Deploy Artifacts
85-
needs: [build, snapshot_tests]
86-
runs-on: ubuntu-latest
87-
steps:
88-
- uses: actions/checkout@v3
89-
- name: Set up JDK
90-
uses: spring-io/spring-gradle-build-action@v2
91-
with:
92-
java-version: 8
93-
distribution: adopt
94-
- name: Deploy Artifacts
95-
env:
96-
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
97-
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
98-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
99-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
100-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
101-
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
102-
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
103-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
104-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
105-
run: ./gradlew publishArtifacts finalizeDeployArtifacts -Duser.name=spring-builds+github -PossrhUsername="$OSSRH_TOKEN_USERNAME" -PossrhPassword="$OSSRH_TOKEN_PASSWORD" -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace
106-
deploy_docs:
32+
needs: [build, test]
33+
uses: spring-io/spring-security-release-tools/.github/workflows/deploy-artifacts.yml@v1
34+
with:
35+
should-deploy-artifacts: ${{ needs.build.outputs.should-deploy-artifacts }}
36+
secrets: inherit
37+
deploy-docs:
10738
name: Deploy Docs
108-
needs: [build, snapshot_tests]
109-
runs-on: ubuntu-latest
110-
steps:
111-
- uses: actions/checkout@v3
112-
- name: Set up JDK
113-
uses: spring-io/spring-gradle-build-action@v2
114-
with:
115-
java-version: 8
116-
distribution: adopt
117-
- name: Deploy Docs
118-
env:
119-
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
120-
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
121-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
122-
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
123-
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
124-
DOCS_HOST: ${{ secrets.DOCS_HOST }}
125-
run: ./gradlew deployDocs -Duser.name=spring-builds+github -PdeployDocsSshKey="$DOCS_SSH_KEY" -PdeployDocsSshUsername="$DOCS_USERNAME" -PdeployDocsHost="$DOCS_HOST" --stacktrace
39+
needs: [build, test]
40+
uses: spring-io/spring-security-release-tools/.github/workflows/deploy-docs.yml@v1
41+
with:
42+
should-deploy-docs: ${{ needs.build.outputs.should-deploy-artifacts }}
43+
secrets: inherit
44+
perform-release:
45+
name: Perform Release
46+
needs: [deploy-artifacts, deploy-docs]
47+
uses: spring-io/spring-security-release-tools/.github/workflows/perform-release.yml@v1
48+
with:
49+
should-perform-release: ${{ needs.deploy-artifacts.outputs.artifacts-deployed }}
50+
project-version: ${{ needs.deploy-artifacts.outputs.project-version }}
51+
milestone-repo-url: https://repo.spring.io/artifactory/milestone
52+
release-repo-url: https://repo1.maven.org/maven2
53+
artifact-path: org/springframework/security/spring-security-oauth2-authorization-server
54+
slack-announcing-id: spring-authorization-server-announcing
55+
secrets: inherit

.github/workflows/pr-build-workflow.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,14 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, windows-latest]
15-
jdk: [8]
16-
include:
17-
- jdk: 8
18-
distribution: adopt
15+
jdk: [11]
1916
fail-fast: false
2017
steps:
2118
- uses: actions/checkout@v3
2219
- name: Set up JDK ${{ matrix.jdk }}
2320
uses: spring-io/spring-gradle-build-action@v2
2421
with:
2522
java-version: ${{ matrix.jdk }}
26-
distribution: ${{ matrix.distribution }}
23+
distribution: 'temurin'
2724
- name: Build with Gradle
2825
run: ./gradlew clean build
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Update Scheduled Release Version
2+
3+
on:
4+
workflow_dispatch: # Manual trigger only. Triggered by release-scheduler.yml on main.
5+
6+
jobs:
7+
update-scheduled-release-version:
8+
name: Update Scheduled Release Version
9+
uses: spring-io/spring-security-release-tools/.github/workflows/update-scheduled-release-version.yml@v1
10+
secrets: inherit

README.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ The project board can be accessed https://github.com/orgs/spring-projects/projec
1515
The feature list can be viewed in the https://docs.spring.io/spring-authorization-server/docs/current/reference/html/overview.html#feature-list[reference documentation].
1616

1717
== Support Policy
18-
The Spring Authorization Server project provides software support and is documented in its link:SUPPORT_POLICY.adoc[support policy].
18+
The Spring Authorization Server project provides software support through the https://tanzu.vmware.com/support/oss[VMware Tanzu OSS support policy].
19+
https://tanzu.vmware.com/spring-runtime[Commercial support], which offers an extended support period, is also available from VMware.
1920

2021
== Getting Started
2122
The first place to start is to read the https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07[OAuth 2.1 Authorization Framework] to gain an in-depth understanding on how to build an Authorization Server.
@@ -51,9 +52,9 @@ In the instructions below, https://vimeo.com/34436402[`./gradlew`] is invoked fr
5152
a cross-platform, self-contained bootstrap mechanism for the build.
5253

5354
=== Prerequisites
54-
https://help.github.com/set-up-git-redirect[Git] and the https://www.oracle.com/technetwork/java/javase/downloads[JDK8 build].
55+
https://help.github.com/set-up-git-redirect[Git] and the https://www.oracle.com/technetwork/java/javase/downloads[jdk11 build].
5556

56-
Be sure that your `JAVA_HOME` environment variable points to the `jdk1.8.0` folder extracted from the JDK download.
57+
Be sure that your `JAVA_HOME` environment variable points to the `jdk11` folder extracted from the JDK download.
5758

5859
=== Check out sources
5960
[indent=0]

SUPPORT_POLICY.adoc

Lines changed: 0 additions & 4 deletions
This file was deleted.

buildSrc/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id "groovy"
55
}
66

7-
sourceCompatibility = JavaVersion.VERSION_1_8
7+
sourceCompatibility = JavaVersion.VERSION_11
88

99
repositories {
1010
gradlePluginPortal()
@@ -23,5 +23,5 @@ dependencies {
2323
implementation "org.hidetake:gradle-ssh-plugin:2.10.1"
2424
implementation "org.jfrog.buildinfo:build-info-extractor-gradle:4.29.0"
2525
implementation "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1"
26-
implementation "org.springframework:spring-core:5.3.30"
26+
implementation "org.springframework:spring-core:5.3.39"
2727
}

buildSrc/src/main/java/org/springframework/gradle/SpringJavaPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ public void apply(Project project) {
7474

7575
// Apply Java source compatibility version
7676
JavaPluginExtension java = project.getExtensions().getByType(JavaPluginExtension.class);
77-
java.setTargetCompatibility(JavaVersion.VERSION_1_8);
77+
java.setTargetCompatibility(JavaVersion.VERSION_11);
7878

7979
// Configure Java tasks
8080
project.getTasks().withType(JavaCompile.class, (javaCompile) -> {
8181
CompileOptions options = javaCompile.getOptions();
8282
options.setEncoding("UTF-8");
8383
options.getCompilerArgs().add("-parameters");
8484
if (JavaVersion.current().isJava11Compatible()) {
85-
options.getRelease().set(8);
85+
options.getRelease().set(11);
8686
}
8787
});
8888
project.getTasks().withType(Jar.class, (jar) -> jar.manifest((manifest) -> {

buildSrc/src/main/java/org/springframework/gradle/docs/SpringJavadocApiPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void apply(Project project) {
5454
api.doLast(new Action<Task>() {
5555
@Override
5656
public void execute(Task task) {
57-
if (JavaVersion.current().isJava8Compatible()) {
57+
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
5858
project.copy((copy) -> copy.from(api.getDestinationDir())
5959
.into(api.getDestinationDir())
6060
.include("element-list")

docs/src/docs/asciidoc/examples/spring-authorization-server-docs-examples.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ plugins {
44

55
group = project.rootProject.group
66
version = project.rootProject.version
7-
sourceCompatibility = "1.8"
7+
sourceCompatibility = "11"
88

99
repositories {
1010
mavenCentral()
1111
}
1212

1313
dependencies {
14-
implementation platform("org.springframework.boot:spring-boot-dependencies:2.7.16")
14+
implementation platform("org.springframework.boot:spring-boot-dependencies:2.7.18")
1515
implementation "org.springframework.boot:spring-boot-starter-web"
1616
implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
1717
implementation "org.springframework.boot:spring-boot-starter-security"

docs/src/docs/asciidoc/examples/src/main/java/sample/jpa/entity/authorization/Authorization.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 the original author or authors.
2+
* Copyright 2020-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)