Skip to content

Commit

Permalink
Switches to username and client id as subject
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-kneier committed Apr 20, 2024
1 parent a7b872f commit 32ee7f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
version: ${{ steps.version.outputs.VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Calculate version
Expand All @@ -45,4 +45,4 @@ jobs:
distribution: 'temurin'
java-version: '21'
- name: Build
run: ./gradlew test jib -Djib.to.image=ghcr.io/${{ github.repository }} -Djib.to.tags=${{ needs.version.outputs.version }},latest -Djib.to.auth.username=${{ github.actor }} -Djib.to.auth.password=${{ secrets.GITHUB_TOKEN }} --no-daemon
run: ./gradlew test jib -Djib.to.image=ghcr.io/${{ github.repository }} -Djib.to.tags=${{ needs.version.outputs.version }},latest -Djib.to.auth.username=${{ github.actor }} -Djib.to.auth.password=${{ secrets.GITHUB_TOKEN }} --console=plain --no-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ClientCredentialsGrant : TokenGrant {
)

context.user = object : User {
override val id = uuid(value = client.id)
override val id = client.id
override val username = client.id
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/main/kotlin/de/solugo/oidc/token/grant/PasswordGrant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import de.solugo.oidc.token.TokenContext
import de.solugo.oidc.token.TokenGrant
import de.solugo.oidc.token.user
import de.solugo.oidc.token.username
import de.solugo.oidc.util.uuid
import org.springframework.stereotype.Component

@Component
Expand All @@ -16,7 +15,7 @@ class PasswordGrant : TokenGrant {
val username = context.username ?: return

context.user = object : User {
override val id = uuid(value = username)
override val id = username
override val username = username
}
}
Expand Down

0 comments on commit 32ee7f4

Please sign in to comment.