Skip to content

Commit

Permalink
Merge branch 'master' into cache-realms
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergrabinski authored Oct 5, 2023
2 parents 5569c8e + c6a155c commit 5b058f8
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 541 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci-release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
distribution: 'temurin'
java-version: '17'
check-latest: true
cache: 'sbt'
- name: Set up proxy for docker buildx
run: |
echo http_proxy=${http_proxy} >> $GITHUB_ENV
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci-release-sonatype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ jobs:
distribution: 'temurin'
java-version: '17'
check-latest: true
cache: 'sbt'
- name: Publish To Sonatype
run: sbt -Dsbt.color=always -Dsbt.supershell=false ci-release
1 change: 0 additions & 1 deletion .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
distribution: 'temurin'
java-version: '17'
check-latest: true
cache: 'sbt'
- name: Set up proxy for docker buildx
run: |
echo http_proxy=${http_proxy} >> $GITHUB_ENV
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ch.epfl.bluebrain.nexus.delta.plugins.jira

import cats.effect.{Clock, IO}
import ch.epfl.bluebrain.nexus.delta.kernel.effect.migration._
import ch.epfl.bluebrain.nexus.delta.kernel.utils.IOInstant
import ch.epfl.bluebrain.nexus.delta.sourcing.Transactors
import ch.epfl.bluebrain.nexus.delta.sourcing.implicits._
Expand Down Expand Up @@ -43,12 +42,10 @@ object TokenStore {
def apply(xas: Transactors)(implicit clock: Clock[IO]): TokenStore = {
new TokenStore {
override def get(user: Identity.User): IO[Option[OAuthToken]] =
toCatsIO(
sql"SELECT token_value FROM jira_tokens WHERE realm = ${user.realm.value} and subject = ${user.subject}"
.query[Json]
.option
.transact(xas.read)
)
sql"SELECT token_value FROM jira_tokens WHERE realm = ${user.realm.value} and subject = ${user.subject}"
.query[Json]
.option
.transact(xas.readCE)
.flatMap {
case Some(token) =>
IO.fromEither(token.as[OAuthToken]).map(Some(_))
Expand All @@ -60,7 +57,7 @@ object TokenStore {
sql""" INSERT INTO jira_tokens(realm, subject, instant, token_value)
| VALUES(${user.realm.value}, ${user.subject}, $now, ${oauthToken.asJson})
| ON CONFLICT (realm, subject) DO UPDATE SET instant = EXCLUDED.instant, token_value = EXCLUDED.token_value
""".stripMargin.update.run.transact(xas.write).void
""".stripMargin.update.run.transact(xas.writeCE).void
}
}
}
Expand Down
30 changes: 0 additions & 30 deletions docs/src/main/paradox/contexts/admin.json

This file was deleted.

9 changes: 0 additions & 9 deletions docs/src/main/paradox/contexts/digest.json

This file was deleted.

59 changes: 0 additions & 59 deletions docs/src/main/paradox/contexts/iam.json

This file was deleted.

14 changes: 0 additions & 14 deletions docs/src/main/paradox/contexts/identity.json

This file was deleted.

32 changes: 0 additions & 32 deletions docs/src/main/paradox/contexts/resolver.json

This file was deleted.

50 changes: 0 additions & 50 deletions docs/src/main/paradox/contexts/resource.json

This file was deleted.

Loading

0 comments on commit 5b058f8

Please sign in to comment.