Skip to content

Commit

Permalink
KC v24
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Włódarczyk committed Mar 10, 2024
1 parent 30557ea commit fbe03cd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 133 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/release-github-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,6 @@ jobs:
- name: Set version from git tag
run: mvn -B -ntp versions:set -DgenerateBackupPoms=false -DnewVersion="$TAG"

- name: Import GPG key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish maven package
run: |
mvn \
--no-transfer-progress \
--batch-mode \
-D gpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
-P ossrh \
clean deploy
env:
MAVEN_USERNAME: kilmajster
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

- name: Add jar to Github Release
uses: svenstaro/upload-release-action@v2
continue-on-error: true
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Keycloak username password attribute authenticator
[![automation tests](https://github.com/kilmajster/keycloak-username-password-attribute-authenticator/actions/workflows/automation-tests.yml/badge.svg)](https://github.com/kilmajster/keycloak-username-password-attribute-authenticator/actions/workflows/automation-tests.yml)
![Maven Central](https://img.shields.io/maven-central/v/io.github.kilmajster/keycloak-username-password-attribute-authenticator)
[![main](https://github.com/kilmajster/keycloak-username-password-attribute-authenticator/actions/workflows/maven.yml/badge.svg)](https://github.com/kilmajster/keycloak-username-password-attribute-authenticator/actions/workflows/maven.yml)
![GitHub](https://img.shields.io/github/license/kilmajster/keycloak-username-password-attribute-authenticator)

#### Supported Keycloak versions
| <img src="https://img.shields.io/badge/compatible_with_Keycloak-16.1.1-orange" alt="compatible with Keycloak - 16.1.1"> | [`keycloak-username-password-attribute-authenticator:0.3.0`](https://github.com/kilmajster/keycloak-username-password-attribute-authenticator/tree/0.3.0) |
|-------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| <img src="https://img.shields.io/badge/compatible_with_Keycloak-24.0.1-blue" alt="compatible with Keycloak - 24.0.1"> | [`keycloak-username-password-attribute-authenticator:1.0.0`](https://github.com/kilmajster/keycloak-username-password-attribute-authenticator/tree/main) |
Expand All @@ -19,8 +19,16 @@ Keycloak default login form with additional user attribute validation. Example:
## Usage
To use this authenticator, it should be bundled together with Keycloak, here are two ways how to do that:

### Deploying jar
TODO
### Deploying jar
Build your Keycloak image like below:
```Dockerfile
FROM quay.io/keycloak/keycloak:24.0.1

RUN curl -s -L -o /opt/keycloak/providers/keycloak-username-password-attribute-authenticator-1.0.0.jar https://github.com/kilmajster/keycloak-username-password-attribute-authenticator/releases/download/1.0.0/keycloak-username-password-attribute-authenticator-1.0.0.jar
RUN /opt/keycloak/bin/kc.sh build

ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start"]
```

## Authentication configuration
Following steps shows how to create authentication flow that uses authenticator with user attribute validation.
Expand Down
113 changes: 1 addition & 112 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@

<packaging>jar</packaging>

<description>Default Keycloak login form with additional user attribute validation️</description>
<description>Default Keycloak login form with additional user attribute validation</description>
<url>https://github.com/kilmajster/keycloak-username-password-attribute-authenticator</url>
<inceptionYear>2021</inceptionYear>

<issueManagement>
<system>github</system>
<url>https://github.com/kilmajster/keycloak-username-password-attribute-authenticator/issues</url>
</issueManagement>

<licenses>
<license>
<name>MIT</name>
Expand All @@ -29,33 +24,6 @@
</license>
</licenses>

<developers>
<developer>
<name>Łukasz Włódarczyk</name>
<email>[email protected]</email>
<timezone>🇵🇱</timezone>
</developer>
</developers>

<ciManagement>
<system>Github</system>
<url>https://github.com/kilmajster/keycloak-username-password-attribute-authenticator/actions</url>
</ciManagement>

<scm>
<connection>scm:git:git://github.com/kilmajster/keycloak-username-password-attribute-authenticator.git</connection>
<developerConnection>scm:git:ssh://github.com:kilmajster/keycloak-username-password-attribute-authenticator.git</developerConnection>
<url>http://github.com/kilmajster/keycloak-username-password-attribute-authenticator</url>
</scm>

<distributionManagement>
<repository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -71,18 +39,6 @@
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-parent</artifactId>
<version>${keycloak.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
Expand All @@ -104,71 +60,4 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>ossrh</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<sourcepath>src/main/java</sourcepath>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit fbe03cd

Please sign in to comment.