Skip to content
Open
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
61 changes: 61 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"extends": [
"config:base"
],
"labels": ["type: dependency upgrade"],
"packageRules": [
{
"matchUpdateTypes": ["major"],
"enabled": false
},
{
"matchPackagePatterns": ["*"],
"allowedVersions": "!/SNAPSHOT$/"
},
{
"matchPackagePatterns": [
"^org\\.codehaus\\.groovy"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this valid for Grails 7?

],
"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"
Comment on lines +23 to +56
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these valid for Grails 7?

],
"groupName": "grails monorepo"
}
]
}
48 changes: 48 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +42 to +48
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a docs task in this project?

23 changes: 23 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -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 }}
133 changes: 133 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the develocity-access-key?

- 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the develocity-access-key?

- 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 }}
Comment on lines +121 to +131
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a docs task in this project?

- name: "⚙️ Run post-release"
uses: apache/grails-github-actions/post-release@asf
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@
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
file or class name and description of purpose be included on the
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.
Expand All @@ -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.
limitations under the License.
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Spring Security OAuth2 Google Plugin
====================================
[ ![Download](https://api.bintray.com/packages/grails/plugins/spring-security-oauth2-google/images/download.svg) ](https://bintray.com/grails/plugins/spring-security-oauth2-google/_latestVersion)
# Spring Security OAuth2 Google Plugin

[![Java CI](https://github.com/grails-plugins/grails-spring-security-oauth2-google/actions/workflows/gradle.yml/badge.svg)](https://github.com/grails-plugins/grails-spring-security-oauth2-google/actions/workflows/gradle.yml)
[![Release](https://github.com/grails-plugins/grails-spring-security-oauth2-google/actions/workflows/release.yml/badge.svg)](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 {
Expand All @@ -16,8 +17,8 @@ dependencies {
}
```

Usage
-----
## Usage

Add this to your application.yml
```
grails:
Expand All @@ -43,6 +44,18 @@ Logged with google?
<oauth2:ifLoggedInWith provider="google">yes</oauth2:ifLoggedInWith>
<oauth2:ifNotLoggedInWith provider="google">no</oauth2:ifNotLoggedInWith>
```
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
Loading
Loading