Skip to content

Commit

Permalink
[breaking] 🔥 Remove deprecated functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwojnowski committed Feb 8, 2024
1 parent b0eda15 commit 6019802
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 43 deletions.
8 changes: 0 additions & 8 deletions core/src/main/scala/me/wojnowski/oidc4s/IdTokenVerifier.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ trait IdTokenVerifier[F[_]] {

object IdTokenVerifier {

@deprecated("Use instance", "0.11.0")
def create[F[_]: Monad: Clock](
publicKeyProvider: PublicKeyProvider[F],
discovery: OpenIdConnectDiscovery[F],
jsonSupport: JsonSupport
): IdTokenVerifier[F] =
this.discovery(publicKeyProvider, discovery, jsonSupport)

def discovery[F[_]: Monad: Clock](
publicKeyProvider: PublicKeyProvider[F],
discovery: OpenIdConnectDiscovery[F],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ object PublicKeyProvider {
.traverse { case (keyId, key) => KeyUtils.parsePublicPemKey(key).map(keyId -> _) }
.map(keyIdToKeyList => static(keyIdToKeyList.toMap))

@deprecated("Use discovery", "0.11.0")
def jwks[F[_]: Monad](
discovery: OpenIdConnectDiscovery[F]
)(
transport: Transport[F],
jsonSupport: JsonSupport
): PublicKeyProvider[F] = this.discovery(discovery)(transport, jsonSupport)

def discovery[F[_]: Monad](
discovery: OpenIdConnectDiscovery[F]
)(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,30 +89,16 @@ object IdTokenVerifierMock {

}

@deprecated("Use version with explicit client ID")
def constSubject[F[_]: Applicative: Traverse: Clock](subject: IdTokenClaims.Subject): IdTokenVerifier[F] =
constSubject[F](subject, ClientId("https://example.com"))

def constSubject[F[_]: Applicative: Clock](subject: IdTokenClaims.Subject, clientId: ClientId = ClientId("https://example.com"))
: IdTokenVerifier[F] =
constSubjectEither[F](Right(subject), clientId)

@deprecated("Use version with explicit client ID")
def constSubjectEither[F[_]: Applicative: Traverse: Clock](errorOrSubject: Either[IdTokenVerifier.Error, IdTokenClaims.Subject])
: IdTokenVerifier[F] = constSubjectEither[F](errorOrSubject, ClientId("https://example.com"))

def constSubjectEither[F[_]: Applicative: Clock](
errorOrSubject: Either[IdTokenVerifier.Error, IdTokenClaims.Subject],
clientId: ClientId = ClientId("https://example.com")
): IdTokenVerifier[F] =
constSubjectPF[F]((_: String) => errorOrSubject, clientId)

@deprecated("Use version with explicit client ID")
def constSubjectPF[F[_]: Applicative: Traverse: Clock](
rawTokenToSubjectPF: PartialFunction[String, Either[IdTokenVerifier.Error, IdTokenClaims.Subject]]
): IdTokenVerifier[F] =
constSubjectPF[F](rawTokenToSubjectPF, ClientId("https://example.com"))

def constSubjectPF[F[_]: Applicative: Clock](
rawTokenToSubjectPF: PartialFunction[String, Either[IdTokenVerifier.Error, IdTokenClaims.Subject]],
clientId: ClientId = ClientId("https://example.com")
Expand All @@ -133,19 +119,6 @@ object IdTokenVerifierMock {
}
)

@deprecated("Use constClaims", "0.12.2")
def constStandardClaims[F[_]: Applicative: Traverse](claims: IdTokenClaims): IdTokenVerifier[F] = constClaims(claims)

@deprecated("Use constClaimsEither", "0.12.2")
def constStandardClaimsEither[F[_]: Applicative: Traverse](claimsEither: Either[IdTokenVerifier.Error, IdTokenClaims])
: IdTokenVerifier[F] =
constClaimsEither(claimsEither)

@deprecated("Use constClaimsEitherPF", "0.12.2")
def constStandardClaimsEitherPF[F[_]: Applicative: Traverse](
rawTokenToClaimsPF: PartialFunction[String, F[Either[IdTokenVerifier.Error, IdTokenClaims]]]
): IdTokenVerifier[F] = constClaimsEitherPF(rawTokenToClaimsPF)

def constClaims[F[_]: Applicative](claims: IdTokenClaims): IdTokenVerifier[F] = constClaimsEither(Right(claims))

def constClaimsEither[F[_]: Applicative](claimsEither: Either[IdTokenVerifier.Error, IdTokenClaims]): IdTokenVerifier[F] =
Expand Down

0 comments on commit 6019802

Please sign in to comment.