Skip to content

Commit

Permalink
fix: require cycle
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed Aug 23, 2024
1 parent b805791 commit d78689a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions apps/easypid/src/crypto/bPrime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@credo-ts/core'
import { Buffer } from '@credo-ts/core'
import { deviceKeyPair } from '@easypid/storage/pidPin'
import { ReceivePidUseCaseBPrimeFlow } from '@easypid/use-cases/ReceivePidUseCaseBPrimeFlow'
import { ReceivePidUseCaseFlow } from '@easypid/use-cases/ReceivePidUseCaseFlow'
import type { EasyPIDAppAgent } from '@package/agent'
import { kdf } from '@package/secure-store/kdf'
import { easyPidAes256Gcm } from './aes'
Expand Down Expand Up @@ -207,8 +207,8 @@ export const createMockedClientAttestationAndProofOfPossession = async (
privateKey: TypedArrayEncoder.fromHex('ad38184e0d5d9af97b023b6421707dc079f7d66a185bfd4c589837e3cb69fbfa'),
})
const payload = {
iss: ReceivePidUseCaseBPrimeFlow.CLIENT_ID,
sub: ReceivePidUseCaseBPrimeFlow.CLIENT_ID,
iss: ReceivePidUseCaseFlow.CLIENT_ID,
sub: ReceivePidUseCaseFlow.CLIENT_ID,
exp: Math.floor(new Date().getTime() / 1000 + 100),
cnf: {
jwk: deviceKeyPair.asJwk(),
Expand All @@ -229,7 +229,7 @@ export const createMockedClientAttestationAndProofOfPossession = async (
const jwtCompact = `${toBeSigned}.${TypedArrayEncoder.toBase64URL(signature)}`

const clientAttestationPopJwtPayload = {
iss: ReceivePidUseCaseBPrimeFlow.CLIENT_ID,
iss: ReceivePidUseCaseFlow.CLIENT_ID,
exp: Math.floor(new Date().getTime() / 1000 + 100),
jti: utils.uuid(),
aud: audience,
Expand Down
1 change: 0 additions & 1 deletion apps/easypid/src/use-cases/ReceivePidUseCaseBPrimeFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export class ReceivePidUseCaseBPrimeFlow extends ReceivePidUseCaseFlow<ReceivePi
'openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fdemo.pid-issuer.bundesdruckerei.de%2Fb1%22%2C%22credential_configuration_ids%22%3A%5B%22pid-sd-jwt%22%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%7D%7D%7D'
private static MDL_OFFER =
'openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fdemo.pid-issuer.bundesdruckerei.de%2Fc%22%2C%22credential_configuration_ids%22%3A%5B%22pid-mso-mdoc%22%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%7D%7D%7D'
static CLIENT_ID = '7598ca4c-cc2e-4ff1-a4b4-ed58f249e274'
private static REDIRECT_URI = 'https://funke.animo.id/redirect'

static async initialize(options: ReceivePidUseCaseBPrimeOptions) {
Expand Down
2 changes: 1 addition & 1 deletion apps/easypid/src/use-cases/ReceivePidUseCaseCFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class ReceivePidUseCaseCFlow extends ReceivePidUseCaseFlow {
'openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fdemo.pid-issuer.bundesdruckerei.de%2Fc%22%2C%22credential_configuration_ids%22%3A%5B%22pid-sd-jwt%22%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%7D%7D%7D'
private static MDL_OFFER =
'openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fdemo.pid-issuer.bundesdruckerei.de%2Fc%22%2C%22credential_configuration_ids%22%3A%5B%22pid-mso-mdoc%22%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%7D%7D%7D'
private static CLIENT_ID = '7598ca4c-cc2e-4ff1-a4b4-ed58f249e274'

private static REDIRECT_URI = 'https://funke.animo.id/redirect'

public static async initialize(options: ReceivePidUseCaseFlowOptions) {
Expand Down
2 changes: 2 additions & 0 deletions apps/easypid/src/use-cases/ReceivePidUseCaseFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export abstract class ReceivePidUseCaseFlow<ExtraOptions = {}> {
protected refreshUrl?: string
protected currentSessionPinAttempts = 0

static CLIENT_ID = '7598ca4c-cc2e-4ff1-a4b4-ed58f249e274'

protected currentState: ReceivePidUseCaseState = 'id-card-auth'
public get state() {
return this.currentState
Expand Down

0 comments on commit d78689a

Please sign in to comment.