diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..0adf2ce --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Global +* @Staffbase/need-for-speed-devs diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index e84dffe..a6c6554 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -9,7 +9,7 @@ on: jobs: continuous-delivery: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Check out Git repository diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0253efc..9479312 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: jobs: build-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 name: Java ${{ matrix.java }} Test strategy: matrix: diff --git a/README.md b/README.md index b984461..85b9aa4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Plugin SDK for Java -If you are developing your own plugin for your Staffbase app we describe the authentication flow of a plugin at https://developers.staffbase.com/guide/customplugin-overview/. While this documentation just covers the conceptual ideas of the interface of plugins though – the so called Plugin SSO – we want to provide a library to help you develop your first plugin for Staffbase even faster. This SDK provides the basic functionality to parse and verify a provided token for Java. +If you are developing your own plugin for your Staffbase app we describe the authentication flow of a plugin at https://developers.staffbase.com/guide/customplugin-overview/. While the official documentation covers only the conceptual aspects of the plugins – the so called Plugin SSO – we want to provide a library to help you develop your first plugin for Staffbase even faster. This SDK provides the basic functionality to parse and verify a provided token for Java. ## Installation @@ -14,7 +14,7 @@ We provide our Plugin SDK via Maven Central Repository (https://repo1.maven.org/ com.staffbase plugins-sdk-java - 1.2.4 + 1.2.9 ``` @@ -22,7 +22,7 @@ We provide our Plugin SDK via Maven Central Repository (https://repo1.maven.org/ ``` dependencies { - compile 'com.staffbase:plugins-sdk-java:1.2.3' + implementation 'com.staffbase:plugins-sdk-java:1.2.9' } ``` @@ -44,7 +44,10 @@ You can try to create a token from the received jwt. RSAPublicKey rsaPublicKey = ... try { + // Create the SSO handler with your RSA public key final SSOFacade ssoFac = SSOFacade.create(rsaPublicKey); + + // Verify and decode the JWT token final SSOData ssoData = ssoFac.verify(jwToken); // If the plugin instance was deleted in Staffbase @@ -81,6 +84,6 @@ To run the tests a simple `# mvn test` command in the root directory will suffic ## License -Copyright 2017-2021 Staffbase GmbH. +Copyright 2017-2025 Staffbase SE. Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 diff --git a/catalog-info.yaml b/catalog-info.yaml new file mode 100644 index 0000000..bab3dd8 --- /dev/null +++ b/catalog-info.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: plugins-sdk-java + description: Framework to create a plugin in Java + annotations: + github.com/project-slug: Staffbase/plugins-sdk-java + tags: + - sdk + - framework +spec: + type: library + lifecycle: production + owner: need-for-speed