diff --git a/.github/renovate.json b/.github/renovate.json
new file mode 100644
index 0000000..30740f8
--- /dev/null
+++ b/.github/renovate.json
@@ -0,0 +1,61 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "labels": ["type: dependency upgrade"],
+ "packageRules": [
+ {
+ "matchUpdateTypes": ["major"],
+ "enabled": false
+ },
+ {
+ "matchPackagePatterns": ["*"],
+ "allowedVersions": "!/SNAPSHOT$/"
+ },
+ {
+ "matchPackagePatterns": [
+ "^org\\.codehaus\\.groovy"
+ ],
+ "groupName": "groovy monorepo"
+ },
+ {
+ "matchPackageNames": [
+ "org.grails:grails-bom",
+ "org.grails:grails-bootstrap",
+ "org.grails:grails-codecs",
+ "org.grails:grails-console",
+ "org.grails:grails-core",
+ "org.grails:grails-databinding",
+ "org.grails:grails-dependencies",
+ "org.grails:grails-docs",
+ "org.grails:grails-encoder",
+ "org.grails:grails-gradle-model",
+ "org.grails:grails-logging",
+ "org.grails:grails-plugin-codecs",
+ "org.grails:grails-plugin-controllers",
+ "org.grails:grails-plugin-databinding",
+ "org.grails:grails-plugin-datasource",
+ "org.grails:grails-plugin-domain-class",
+ "org.grails:grails-plugin-i18n",
+ "org.grails:grails-plugin-interceptors",
+ "org.grails:grails-plugin-mimetypes",
+ "org.grails:grails-plugin-rest",
+ "org.grails:grails-plugin-services",
+ "org.grails:grails-plugin-url-mappings",
+ "org.grails:grails-plugin-url-validation",
+ "org.grails:grails-shell",
+ "org.grails:grails-spring",
+ "org.grails:grails-test",
+ "org.grails:grails-validation",
+ "org.grails:grails-web",
+ "org.grails:grails-web-boot",
+ "org.grails:grails-web-common",
+ "org.grails:grails-web-databinding",
+ "org.grails:grails-web-fileupload",
+ "org.grails:grails-web-mvc",
+ "org.grails:grails-web-url-mappings"
+ ],
+ "groupName": "grails monorepo"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
new file mode 100644
index 0000000..d16a0f5
--- /dev/null
+++ b/.github/workflows/gradle.yml
@@ -0,0 +1,48 @@
+name: "Java CI"
+on:
+ push:
+ branches:
+ - master
+ - 'grails_[0-9]+.x'
+ pull_request:
+ branches:
+ - master
+ - 'grails_[0-9]+.x'
+ workflow_dispatch:
+jobs:
+ publish_snapshot:
+ if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
+ name: "Build Project and Publish Snapshot release"
+ runs-on: ubuntu-24.04
+ permissions:
+ contents: write # updates gh-pages branch
+ packages: write # publishes snapshot to GitHub Packages
+ steps:
+ - name: "📥 Checkout repository"
+ uses: actions/checkout@v4
+ - name: "☕️ Setup JDK"
+ uses: actions/setup-java@v4
+ with:
+ java-version: 17
+ distribution: liberica
+ - name: "🐘 Setup Gradle"
+ uses: gradle/actions/setup-gradle@v4
+ with:
+ develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+ - name: "🔨 Build Project"
+ run: ./gradlew build
+ - name: "📤 Publish Snapshot version to Artifactory (repo.grails.org)"
+ env:
+ GRAILS_PUBLISH_RELEASE: 'false'
+ MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
+ MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
+ MAVEN_PUBLISH_URL: 'https://repo.grails.org/artifactory/plugins3-snapshots-local'
+ run: ./gradlew publish
+ - name: "📖 Generate Snapshot Documentation"
+ run: ./gradlew docs
+ - name: "📤 Publish Snapshot Documentation to Github Pages"
+ uses: apache/grails-github-actions/deploy-github-pages@asf
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GRADLE_PUBLISH_RELEASE: 'false'
+ SOURCE_FOLDER: build/docs
\ No newline at end of file
diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml
new file mode 100644
index 0000000..ab21960
--- /dev/null
+++ b/.github/workflows/release-notes.yml
@@ -0,0 +1,23 @@
+name: "Release Drafter"
+on:
+ issues:
+ types: [closed, reopened]
+ push:
+ branches:
+ - master
+ - 'grails_[0-9]+.x'
+ pull_request:
+ types: [opened, reopened, synchronize]
+ pull_request_target:
+ types: [opened, reopened, synchronize]
+jobs:
+ update_release_draft:
+ permissions:
+ contents: write
+ pull-requests: write
+ runs-on: ubuntu-24.04
+ steps:
+ - name: "📝 Update Release Draft"
+ uses: release-drafter/release-drafter@v6
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..896eb04
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,133 @@
+name: Release
+on:
+ release:
+ types: [ published ]
+env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ JAVA_VERSION: '17.0.15' # this must be a specific version for reproducible builds
+ RELEASE_TAG_PREFIX: 'v'
+ DOCUMENTATION: 'false'
+jobs:
+ publish:
+ permissions:
+ packages: read # pre-release workflow
+ contents: write # to create release
+ issues: write # to modify milestones
+ runs-on: ubuntu-latest
+ outputs:
+ release_version: ${{ steps.release_version.outputs.value }}
+ extract_repository_name: ${{ steps.extract_repository_name.outputs.repository_name }}
+ steps:
+ - name: "📝 Store the current release version"
+ id: release_version
+ run: |
+ export RELEASE_VERSION="${{ github.ref_name }}"
+ export RELEASE_VERSION=${RELEASE_VERSION:${#RELEASE_TAG_PREFIX}}
+ echo "Found Release Version: ${RELEASE_VERSION}"
+ echo "value=${RELEASE_VERSION}" >> $GITHUB_OUTPUT
+ - name: "Extract repository name"
+ id: extract_repository_name
+ run: |
+ echo "repository_name=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
+ - name: "📥 Checkout the repository"
+ uses: actions/checkout@v4
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ ref: v${{ steps.release_version.outputs.value }}
+ - name: 'Ensure Common Build Date' # to ensure a reproducible build
+ run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
+ - name: "Ensure source files use common date"
+ run: |
+ find . -depth \( -type f -o -type d \) -exec touch -d "@${SOURCE_DATE_EPOCH}" {} +
+ - name: "☕️ Setup JDK"
+ uses: actions/setup-java@v4
+ with:
+ distribution: liberica
+ java-version: ${{ env.JAVA_VERSION }}
+ - name: "🐘 Setup Gradle"
+ uses: gradle/actions/setup-gradle@v4
+ - name: "⚙️ Run pre-release"
+ uses: grails/github-actions/pre-release@asf
+ env:
+ RELEASE_VERSION: ${{ steps.release_version.outputs.value }}
+ - name: "🔐 Generate key file for artifact signing"
+ env:
+ SECRING_FILE: ${{ secrets.SECRING_FILE }}
+ run: |
+ printf "%s" "$SECRING_FILE" | base64 -d > "${{ github.workspace }}/secring.gpg"
+ - name: "🧩 Run Assemble"
+ id: assemble
+ run: |
+ ./gradlew -U assemble -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg -Psigning.keyId=${{ secrets.SIGNING_KEY }}
+ env:
+ GRAILS_PUBLISH_RELEASE: 'true'
+ SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
+ SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
+ - name: "📤 Publish to Maven Central"
+ env:
+ GRAILS_PUBLISH_RELEASE: 'true'
+ NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
+ NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
+ NEXUS_PUBLISH_URL: 'https://ossrh-staging-api.central.sonatype.com/service/local/'
+ NEXUS_PUBLISH_DESCRIPTION: '${{ steps.extract_repository_name.outputs.repository_name }}:${{ steps.release_version.outputs.value }}'
+ SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
+ SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
+ run: >
+ ./gradlew
+ -Psigning.keyId=${{ secrets.SIGNING_KEY }}
+ -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
+ publishMavenPublicationToSonatypeRepository
+ closeSonatypeStagingRepository
+ - name: "Generate Build Date file"
+ run: echo "$SOURCE_DATE_EPOCH" >> build/BUILD_DATE.txt
+ - name: "Upload Build Date file"
+ uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
+ with:
+ files: build/BUILD_DATE.txt
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ release:
+ needs: publish
+ runs-on: ubuntu-latest
+ environment: release
+ permissions:
+ contents: write
+ issues: write
+ pull-requests: write
+ steps:
+ - name: "📥 Checkout repository"
+ uses: actions/checkout@v4
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ ref: v${{ needs.publish.outputs.release_version }}
+ - name: "☕️ Setup JDK"
+ uses: actions/setup-java@v4
+ with:
+ distribution: liberica
+ java-version: ${{ env.JAVA_VERSION }}
+ - name: "🐘 Setup Gradle"
+ uses: gradle/actions/setup-gradle@v4
+ - name: "📤 Release staging repository"
+ env:
+ GRAILS_PUBLISH_RELEASE: 'true'
+ NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
+ NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
+ NEXUS_PUBLISH_URL: 'https://ossrh-staging-api.central.sonatype.com/service/local/'
+ NEXUS_PUBLISH_DESCRIPTION: '${{ needs.publish.outputs.extract_repository_name }}:${{ needs.publish.outputs.release_version }}'
+ run: >
+ ./gradlew
+ findSonatypeStagingRepository
+ releaseSonatypeStagingRepository
+ - name: "📖 Generate Documentation"
+ if: ${{ env.DOCUMENTATION != 'false' }}
+ run: ./gradlew docs
+ - name: "📤 Publish Documentation to Github Pages"
+ if: ${{ env.DOCUMENTATION != 'false' }}
+ uses: apache/grails-github-actions/deploy-github-pages@asf
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GRADLE_PUBLISH_RELEASE: 'true'
+ SOURCE_FOLDER: build/docs
+ VERSION: ${{ needs.publish.outputs.release_version }}
+ - name: "⚙️ Run post-release"
+ uses: apache/grails-github-actions/post-release@asf
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 4c6a985..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-sudo: false
-language: java
-jdk:
-- openjdk8
-branches:
- only:
- - master
-cache:
- directories:
- - "$HOME/.grails"
- - "$HOME/.gradle"
-before_script:
-- chmod +x gradlew
-script: "./travis-build.sh"
-env:
- global:
- - GIT_NAME="Puneet Behl"
- - GIT_EMAIL="behl4485@gmail.com"
- - secure: IC1tnlHI4x9p/1y5OgyjJnZBoVmcaUlzaUP4IQzcbh1Dr8lTqaZAt+3ZcbayiFYS0D4n9yz9gkdWkYLwhh3CZodWrQ5sQEhHEwxfcnSY5bNq2/rZALI66/IWPmy2GKmiZ2DKKqpZwwZgopBEszYPnbJOlXQAwyPERXRmSK+zyQDp4pWW6kvO914a5nhB6NLDMt3LzJlJ4nxKIA85Ap+4zTVr/wir1VTUKRo8G8VMXsYTJCEG3HDlrrR5xA3YptdcbrJ2Q4Aqs77y3n1OTN1X63iHhTF4onqcVGEBeIYBfuHnb6EUKBfnYvnZYT8Cro46KXyz7bGodHVvvNivmVYpapNWyw2JKoGQyBVWYJPBYBI6+QKNupPUGa/huklAtuTueHYVi77imqwEhcaen7SlYwd7vUW6ohhZS+4L3ep0Iu3TjQzJlGtKDV/JLxp6PbfxXaxI5gyttxSpuuo3bqic/bpQhIqkQqzcDU6Hu0gcDZKgc27zUEY5qn7ddSAKnVtsksrEkqRIcwlsCHQPgVSfVzNd8JVF+DYpEg59m/lSxZyPNm/gdKlouV0yxBhMhRW9zdw1Qhl43toHsnlUfg7RIyUkr11AdjE/x7Q7E/V6DhbisdypR2h+nhaiPWfcTGD/6UvEXR+hUIvS/6k7TkbJDDim9OSyw827YOLo4NqOFoM=
- - secure: aqgD5AOkMa291ImTVq94FiyiSIv0Y/lYS98vgyYfNr1saQdCEPkawbd2JbCLacSGqUto3y1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83H6F1K6SDvohegO8BoRrd8/mfQ4QSlNAe3mF+rDYiSDR+wgplQvmO2keLHSU91F5e02eChul4xxM/IWPO8F1i42HDwtUmsq9Res+y88UorTj9/xyBhug2PIHsx8dQG3YhA=
- - secure: UvRNHLZARs3HnMQglnYEnBXYEMoyddgiB9Q6BSgyvpr88S66pjnSZaOaH6X0rqwaREaMwW/bGcmE/llfmsXKDP5W58PPZN9lG01rZiKoHpWMy7Xj3iFktCxdFsmKPjYPvP78CyWEZvIQdemR+JCVCaIlx60RN/B8m7TFVstn9logWea5h4Uanp1kIagXCxkCyKFNXBTdsw9L6931Hg4nLg97r5v3lDEh6oKmGULrmB1BFscO/3bx4Ueg4MzhGvpRfbVTSfANupgwIf6eRTnaOiAB4g1RNjs8Wxd6kGPcgjwseO+uH4H5KGwxjeK7wjMLPqV1xoSQXA89WjinzX42TCOqC3LbDkk6CFlhEkU+R7e1VnR4y9NPLSuXl48Y3z79UuU44LepDVp3o44DuLmy+bNgwDcmIB7dauN3NOxyKANEvRWKEsgv0xNBpvcZu2E2e0MILBdqSfcFa8siSql9cIWaaGeOJXgnsEy+6u7Er2AKQrElJVgf7pNLPPV9FmEi+jAO1JIqWlekp2S9hBPUIq5vcTWb0Wf1oKGAr96v9IE0xIASDb7HynsMuZqnF6V9iYPGOANoWDZWzSIddjSTRLZNAdox0YRyqDcuPJ7eVZGY78VuvxmgZ9Fag86d5ztEoBykw/3Ims/tcnsPResLF5WSi4keCIxwoOITKIYJTpo=
diff --git a/LICENSE b/LICENSE
index 9c8f3ea..261eeb9 100644
--- a/LICENSE
+++ b/LICENSE
@@ -178,7 +178,7 @@
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
+ boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright {yyyy} {name of copyright owner}
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
- limitations under the License.
\ No newline at end of file
+ limitations under the License.
diff --git a/README.md b/README.md
index 7842bcb..7d954b4 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,12 @@
-Spring Security OAuth2 Google Plugin
-====================================
-[  ](https://bintray.com/grails/plugins/spring-security-oauth2-google/_latestVersion)
+# Spring Security OAuth2 Google Plugin
+
+[](https://github.com/grails-plugins/grails-spring-security-oauth2-google/actions/workflows/gradle.yml)
+ [](https://github.com/grails-plugins/grails-spring-security-oauth2-google/actions/workflows/release.yml)
Add a Google OAuth2 provider to the [Spring Security OAuth2 Plugin](https://github.com/grails-plugins/grails-spring-security-oauth2).
-Installation
-------------
+## Installation
+
Add the following dependencies in `build.gradle`
```
dependencies {
@@ -16,8 +17,8 @@ dependencies {
}
```
-Usage
------
+## Usage
+
Add this to your application.yml
```
grails:
@@ -43,6 +44,18 @@ Logged with google?
yes
no
```
-License
--------
+
+## Versions
+
+| Branch | Grails Version |
+|--------|----------------|
+| 1.x | 3+ |
+| 2.x | 7.0.0 |
+
+
+### Note:
+No working version for Grails 6.x at the moment (see https://github.com/grails-plugins/grails-spring-security-oauth2-google/issues/4)
+
+## License
+
Apache 2
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index ef950e0..c2b284e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,88 +1,76 @@
+import java.time.Instant
+import java.time.ZoneOffset
+import java.time.format.DateTimeFormatter
+
buildscript {
- ext {
- grailsVersion = project.grailsVersion
- }
repositories {
- mavenLocal()
- maven { url "https://repo.grails.org/grails/core" }
+ mavenCentral()
+ maven { url = 'https://repo.grails.org/grails/restricted' }
+ maven {
+ url = 'https://repository.apache.org/content/groups/snapshots'
+ content {
+ includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT')
+ }
+ }
}
dependencies {
- classpath "org.grails:grails-gradle-plugin:$grailsVersion"
- classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.15.1"
+ classpath platform("org.apache.grails:grails-bom:$grailsVersion")
+ classpath 'org.apache.grails:grails-gradle-plugins'
}
}
-def setIfNotSet = { String name, value ->
- if (!project.ext.has(name)) {
- project.ext[name] = value
- }
-}
-setIfNotSet 'issueTrackerUrl', project.vcsUrl + '/issues'
-setIfNotSet 'websiteUrl', project.vcsUrl
+apply plugin: 'groovy'
+apply plugin: 'java-library'
+apply plugin: 'org.apache.grails.gradle.grails-plugin'
+apply plugin: 'org.apache.grails.gradle.grails-publish'
-version "1.2.1.BUILD-SNAPSHOT"
group = 'org.grails.plugins'
-apply plugin:"eclipse"
-apply plugin: "idea"
-apply plugin: "org.grails.grails-plugin"
-apply plugin: "org.grails.grails-plugin-publish"
-apply plugin: "org.grails.grails-gsp"
-apply plugin: "asset-pipeline"
-
ext {
- grailsVersion = project.grailsVersion
- gradleWrapperVersion = project.gradleWrapperVersion
+ buildInstant = java.util.Optional.ofNullable(System.getenv('SOURCE_DATE_EPOCH'))
+ .filter(s -> !s.isEmpty())
+ .map(Long::parseLong)
+ .map(Instant::ofEpochSecond)
+ .orElseGet(Instant::now) as Instant
+ formattedBuildDate = DateTimeFormatter.ISO_INSTANT.format(buildInstant)
+ buildDate = buildInstant.atZone(ZoneOffset.UTC) // for reproducible builds
}
repositories {
- mavenLocal()
- maven { url "https://repo.grails.org/grails/core" }
-}
-
-dependencyManagement {
- imports {
- mavenBom "org.grails:grails-bom:$grailsVersion"
+ mavenCentral()
+ maven { url = 'https://repo.grails.org/grails/restricted' }
+ maven {
+ url = 'https://repository.apache.org/content/groups/snapshots'
+ content {
+ includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT')
+ }
}
- applyMavenExclusions false
}
dependencies {
- console "org.grails:grails-console"
+ implementation platform("org.apache.grails:grails-bom:$grailsVersion")
+ compileOnly 'org.springframework.boot:spring-boot-starter-logging'
+ compileOnly 'org.springframework.boot:spring-boot-starter-validation'
+ compileOnly 'org.springframework.boot:spring-boot-autoconfigure'
+ compileOnly 'org.springframework.boot:spring-boot-starter'
+ compileOnly 'org.apache.grails:grails-core'
- profile "org.grails.profiles:web-plugin"
-
- provided 'javax.servlet:javax.servlet-api:3.1.0'
- provided 'org.grails:grails-dependencies'
- provided 'org.grails.plugins:spring-security-core:3.2.+'
- provided 'org.grails.plugins:spring-security-oauth2:1.2.0'
- provided "org.grails:grails-plugin-services"
-
- runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.15.1"
-
- testCompile "cglib:cglib-nodep:2.2.2"
- testCompile "org.grails:grails-plugin-testing"
- testCompile "org.grails:grails-web-testing-support"
-}
-
-task wrapper(type: Wrapper) {
- gradleVersion = gradleWrapperVersion
+ implementation 'org.apache.grails:grails-spring-security:7.0.0-SNAPSHOT'
+ implementation 'org.apache.grails:grails-spring-security-oauth2:7.0.0-SNAPSHOT'
}
grailsPublish {
- user = System.getProperty("BINTRAY_USER")
- key = System.getProperty("BINTRAY_KEY")
githubSlug = 'grails-plugins/grails-spring-security-oauth2-google'
license {
name = 'Apache-2.0'
}
- title = "Spring Security Oauth2 Google Provider"
- desc = "This plugin provides the capability to authenticate via g+-oauth provider. Depends on grails-spring-security-oauth2. v1.2.0 starts after fork to grails-plugins org. Includes unreleased 1.1.1 from other repo."
- developers = [MatrixCrawler: "Johannes Brunswicker",
- rvanderwerf : "Ryan Vanderwerf"]
- userOrg = 'grails'
+ title = 'Spring Security Oauth2 Google Provider'
+ desc = 'This plugin provides the oauth2 Google provider for grails-spring-security-oauth2 plugin.'
+ developers = [
+ MatrixCrawler: 'Johannes Brunswicker',
+ rvanderwerf : 'Ryan Vanderwerf',
+ sbglasius : 'Søren Berg Glasius',
+ ]
}
-assets {
- packagePlugin = true
-}
+compileJava.options.release = javaVersion.toInteger()
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
new file mode 100644
index 0000000..077a990
--- /dev/null
+++ b/buildSrc/build.gradle
@@ -0,0 +1,25 @@
+plugins {
+ id 'groovy-gradle-plugin'
+}
+
+file('../gradle.properties').withInputStream {
+ def gradleProperties = new Properties()
+ gradleProperties.load(it)
+ gradleProperties.each { k, v -> ext.set(k, v) }
+
+}
+
+repositories {
+ maven { url = 'https://repo.grails.org/grails/restricted' }
+ maven {
+ url = 'https://repository.apache.org/content/groups/snapshots'
+ content {
+ includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT')
+ }
+ }
+}
+
+dependencies {
+ implementation platform("org.apache.grails:grails-bom:$grailsVersion")
+ implementation 'org.apache.grails:grails-gradle-plugins'
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 72c6aa5..78cc873 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,3 +1,7 @@
-grailsVersion=3.3.8
-gradleWrapperVersion=4.10.2
-vcsUrl=https://github.com/grails-plugins/grails-spring-security-oauth2-google
+version=2.0.0-SNAPSHOT
+grailsVersion=7.0.0-SNAPSHOT
+javaVersion=17
+
+org.gradle.daemon=true
+org.gradle.parallel=true
+org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 29953ea..1b33c55 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index fb7ef98..d4081da 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
diff --git a/gradlew b/gradlew
index cccdd3d..23d15a9 100755
--- a/gradlew
+++ b/gradlew
@@ -1,78 +1,129 @@
-#!/usr/bin/env sh
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+#
##############################################################################
-##
-## Gradle start up script for UN*X
-##
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
##############################################################################
# Attempt to set APP_HOME
+
# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
+MAX_FD=maximum
warn () {
echo "$*"
-}
+} >&2
die () {
echo
echo "$*"
echo
exit 1
-}
+} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
esac
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+CLASSPATH="\\\"\\\""
+
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
+ JAVACMD=$JAVA_HOME/jre/sh/java
else
- JAVACMD="$JAVA_HOME/bin/java"
+ JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -81,92 +132,120 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ JAVACMD=java
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
fi
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
fi
- i=$((i+1))
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
fi
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
+ "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
fi
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
+
exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
old mode 100644
new mode 100755
index f955316..db3a6ac
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,4 +1,22 @@
-@if "%DEBUG%" == "" @echo off
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
+
+@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -9,25 +27,29 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
+if %ERRORLEVEL% equ 0 goto execute
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
@@ -35,48 +57,36 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-if exist "%JAVA_EXE%" goto init
+if exist "%JAVA_EXE%" goto execute
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
:execute
@rem Setup the command line
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+set CLASSPATH=
+
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
+if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
diff --git a/grails-app/conf/logback-spring.xml b/grails-app/conf/logback-spring.xml
new file mode 100644
index 0000000..e1cc849
--- /dev/null
+++ b/grails-app/conf/logback-spring.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+ false
+
+ ${CONSOLE_LOG_THRESHOLD}
+
+
+ ${CONSOLE_LOG_PATTERN}
+ ${CONSOLE_LOG_CHARSET}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/grails-app/conf/logback.groovy b/grails-app/conf/logback.groovy
deleted file mode 100644
index e6ed9a7..0000000
--- a/grails-app/conf/logback.groovy
+++ /dev/null
@@ -1,24 +0,0 @@
-import grails.util.BuildSettings
-import grails.util.Environment
-
-// See http://logback.qos.ch/manual/groovy.html for details on configuration
-appender('STDOUT', ConsoleAppender) {
- encoder(PatternLayoutEncoder) {
- pattern = "%level %logger - %msg%n"
- }
-}
-
-//logger 'grails.plugin.springsecurity.oauth2.google', TRACE
-root(ERROR, ['STDOUT'])
-
-def targetDir = BuildSettings.TARGET_DIR
-if (Environment.isDevelopmentMode() && targetDir) {
- appender("FULL_STACKTRACE", FileAppender) {
- file = "${targetDir}/stacktrace.log"
- append = true
- encoder(PatternLayoutEncoder) {
- pattern = "%level %logger - %msg%n"
- }
- }
- logger("StackTrace", ERROR, ['FULL_STACKTRACE'], false)
-}
diff --git a/grails-app/services/grails/plugin/springsecurity/oauth2/google/GoogleOAuth2Service.groovy b/grails-app/services/grails/plugin/springsecurity/oauth2/google/GoogleOAuth2Service.groovy
index b44fb3a..55d9965 100644
--- a/grails-app/services/grails/plugin/springsecurity/oauth2/google/GoogleOAuth2Service.groovy
+++ b/grails-app/services/grails/plugin/springsecurity/oauth2/google/GoogleOAuth2Service.groovy
@@ -1,9 +1,7 @@
package grails.plugin.springsecurity.oauth2.google
-import com.github.scribejava.apis.GoogleApi20
import com.github.scribejava.core.builder.api.DefaultApi20
import com.github.scribejava.core.model.OAuth2AccessToken
-import grails.converters.JSON
import grails.plugin.springsecurity.oauth2.exception.OAuth2Exception
import grails.plugin.springsecurity.oauth2.service.OAuth2AbstractProviderService
import grails.plugin.springsecurity.oauth2.token.OAuth2SpringToken
diff --git a/settings.gradle b/settings.gradle
index 5dbe9fb..d884283 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1,34 @@
-rootProject.name = 'spring-security-oauth2-google'
\ No newline at end of file
+plugins {
+ id 'com.gradle.develocity' version '4.0'
+ id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.2.1'
+}
+
+def isCI = System.getenv().containsKey('CI')
+def isLocal = !isCI
+def isReproducibleBuild = System.getenv('SOURCE_DATE_EPOCH') != null
+if (isReproducibleBuild) {
+ gradle.settingsEvaluated {
+ logger.warn('*************** Remote Build Cache Disabled due to Reproducible Build ********************')
+ logger.warn("Build date will be set to (SOURCE_DATE_EPOCH=${System.getenv("SOURCE_DATE_EPOCH")})")
+ }
+}
+
+develocity {
+ server = 'https://ge.grails.org'
+ buildScan {
+ tag('grails-plugins')
+ tag(rootProject.name)
+ publishing.onlyIf { it.authenticated }
+ uploadInBackground = isLocal
+ }
+}
+
+buildCache {
+ local { enabled = (isLocal && !isReproducibleBuild) || (isCI && isReproducibleBuild) }
+ remote(develocity.buildCache) {
+ push = isCI
+ enabled = !isReproducibleBuild
+ }
+}
+
+rootProject.name = 'grails-spring-security-oauth2-google'
diff --git a/src/main/groovy/grails/plugin/springsecurity/oauth2/google/GoogleOauth2SpringToken.groovy b/src/main/groovy/grails/plugin/springsecurity/oauth2/google/GoogleOauth2SpringToken.groovy
index 3d4aadb..cee7571 100644
--- a/src/main/groovy/grails/plugin/springsecurity/oauth2/google/GoogleOauth2SpringToken.groovy
+++ b/src/main/groovy/grails/plugin/springsecurity/oauth2/google/GoogleOauth2SpringToken.groovy
@@ -12,7 +12,7 @@ import grails.plugin.springsecurity.oauth2.token.OAuth2SpringToken
* Created on 18.06.2016
* @author J. Brunswicker
*/
-class GoogleOauth2SpringToken extends OAuth2SpringToken{
+class GoogleOauth2SpringToken extends OAuth2SpringToken {
private String email
private String providerId
diff --git a/src/main/groovy/grails/plugin/springsecurity/oauth2/google/SpringSecurityOauth2GoogleGrailsPlugin.groovy b/src/main/groovy/grails/plugin/springsecurity/oauth2/google/SpringSecurityOauth2GoogleGrailsPlugin.groovy
index df5dbcc..df01498 100644
--- a/src/main/groovy/grails/plugin/springsecurity/oauth2/google/SpringSecurityOauth2GoogleGrailsPlugin.groovy
+++ b/src/main/groovy/grails/plugin/springsecurity/oauth2/google/SpringSecurityOauth2GoogleGrailsPlugin.groovy
@@ -6,47 +6,31 @@ import grails.plugin.springsecurity.oauth2.SpringSecurityOauth2BaseService
import grails.plugin.springsecurity.oauth2.exception.OAuth2Exception
import grails.plugins.Plugin
import groovy.util.logging.Slf4j
-import org.slf4j.LoggerFactory
@Slf4j
class SpringSecurityOauth2GoogleGrailsPlugin extends Plugin {
// the version or versions of Grails the plugin is designed for
- def grailsVersion = "3.1.8 > *"
+ def grailsVersion = "7.0.0-SNAPSHOT > *"
// resources that are excluded from plugin packaging
def pluginExcludes = [
"grails-app/views/error.gsp"
]
List loadAfter = ['spring-security-oauth2']
- // TODO Fill in these fields
def title = "Spring Security Oauth2 Google Provider" // Headline display name of the plugin
def author = "Johannes Brunswicker"
def authorEmail = "johannes.brunswicker@gmail.com"
- def description = '''\
-This plugin provides the capability to authenticate via g+-oauth provider. Depends on grails-spring-security-oauth2.
-'''
- def profiles = ['web']
-
- // URL to the plugin's documentation
- def documentation = "http://grails.org/plugin/grails-spring-security-oauth2-google"
-
- // Extra (optional) plugin metadata
-
- // License: one of 'APACHE', 'GPL2', 'GPL3'
+ def description = 'This plugin provides the capability to authenticate via google-oauth provider. Depends on grails-spring-security-oauth2.'
+ def documentation = 'https://grails.org/plugin/grails-spring-security-oauth2-google'
def license = "APACHE"
-
- // Details of company behind the plugin (if there is one)
-// def organization = [ name: "My Company", url: "http://www.my-company.com/" ]
-
- // Any additional developers beyond the author specified above.
-// def developers = [ [ name: "Joe Bloggs", email: "joe@bloggs.net" ]]
-
- // Location of the plugin's issue tracker.
-// def issueManagement = [ system: "JIRA", url: "http://jira.grails.org/browse/GPMYPLUGIN" ]
-
- // Online location of the plugin's browseable source code.
-// def scm = [ url: "http://svn.codehaus.org/grails-plugins/" ]
+ def developers = [
+ [name: 'Johannes Brunswicker', github: 'MatrixCrawler'],
+ [name: 'Ryan Vanderwerf', github: 'rvanderwerf'],
+ [name: 'Søren Berg Glasius', github: 'sbglasius']
+ ]
+ def issueManagement = [system: "GitHub", url: 'https://github.com/grails-plugins/grails-spring-security-oauth2-google/issues/browse/GPMYPLUGIN']
+ def scm = [url: 'https://github.com/grails-plugins/grails-spring-security-oauth2-google']
Closure doWithSpring() {
{ ->
@@ -61,22 +45,18 @@ This plugin provides the capability to authenticate via g+-oauth provider. Depen
boolean printStatusMessages = (coreConf.printStatusMessages instanceof Boolean) ? coreConf.printStatusMessages : true
if (!coreConf || !coreConf.active) {
if (printStatusMessages) {
- println("ERROR: There is no SpringSecurity configuration or SpringSecurity is disabled")
- println("ERROR: Stopping configuration of SpringSecurity Oauth2")
+ println('ERROR: There is no SpringSecurity configuration or SpringSecurity is disabled')
+ println(' Stopping configuration of SpringSecurity Oauth2')
}
return
}
- if (!hasProperty('log')) {
- this.metaClass.log = LoggerFactory.getLogger(SpringSecurityOauth2GoogleGrailsPlugin)
- }
-
if (printStatusMessages) {
- println("Configuring Spring Security OAuth2 Google plugin...")
+ println('Configuring Spring Security OAuth2 Google plugin...')
}
SpringSecurityUtils.loadSecondaryConfig('DefaultOAuth2GoogleConfig')
if (printStatusMessages) {
- println("... finished configuring Spring Security OAuth2 Google\n")
+ println('... finished configuring Spring Security OAuth2 Google\n')
}
}
}
@@ -84,13 +64,12 @@ This plugin provides the capability to authenticate via g+-oauth provider. Depen
@Override
void doWithApplicationContext() {
log.trace("doWithApplicationContext")
- SpringSecurityOauth2BaseService oAuth2BaseService = grailsApplication.mainContext.getBean('springSecurityOauth2BaseService') as SpringSecurityOauth2BaseService
- GoogleOAuth2Service googleOAuth2Service = grailsApplication.mainContext.getBean('googleOAuth2Service') as GoogleOAuth2Service
+ SpringSecurityOauth2BaseService oAuth2BaseService = grailsApplication.mainContext.getBean(SpringSecurityOauth2BaseService)
+ GoogleOAuth2Service googleOAuth2Service = grailsApplication.mainContext.getBean(GoogleOAuth2Service)
try {
oAuth2BaseService.registerProvider(googleOAuth2Service)
} catch (OAuth2Exception exception) {
- log.error("There was an oAuth2Exception", exception)
- log.error("OAuth2 Google not loaded")
+ log.error('OAuth2 Google not loaded', exception)
}
}
}
diff --git a/travis-build.sh b/travis-build.sh
deleted file mode 100755
index bcaed00..0000000
--- a/travis-build.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-rm -rf build
-
-./gradlew -q clean check install --stacktrace
-
-EXIT_STATUS=0
-
-echo "branch: $TRAVIS_BRANCH"
-echo "pull-request: $TRAVIS_PULL_REQUEST"
-echo "travis tag: $TRAVIS_TAG"
-
-if [[ -n $TRAVIS_TAG ]] || [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then
-
- echo "Publishing archives ... "
-
- if [[ -n $TRAVIS_TAG ]]; then
- ./gradlew bintrayUpload || EXIT_STATUS=$?
- else
- ./gradlew publish || EXIT_STATUS=$?
- fi
-
-# ./publish-docs.sh
-
-fi