Skip to content

Commit

Permalink
chore: styling
Browse files Browse the repository at this point in the history
  • Loading branch information
chsavvaidis committed Feb 17, 2025
1 parent 48b3511 commit e10209e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,15 @@ object OpenID4VCI {
tokenEndpoint = "$baseUrl/token",
credentialEndpoint = "$baseUrl/credential",
batchCredentialEndpoint = "$baseUrl/batch_credential",
deferredCredentialEndpoint = "$baseUrl/credential_deferred",
deferredCredentialEndpoint = "$baseUrl/credential_deferred", // (EBSI)
jwksUri = "$baseUrl/jwks",
grantTypesSupported = setOf(GrantType.authorization_code, GrantType.pre_authorized_code),
grantTypesSupported = setOf(
GrantType.authorization_code,
GrantType.pre_authorized_code)
,
requestUriParameterSupported = true,
subjectTypesSupported = setOf(SubjectType.public),
credentialIssuer = baseUrl, // (EBSI) this should be just "$baseUrl" https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#section-11.2.1
credentialIssuer = baseUrl,
responseTypesSupported = setOf(
"code",
"vp_token",
Expand All @@ -364,7 +367,7 @@ object OpenID4VCI {
grantTypesSupported = setOf(GrantType.authorization_code, GrantType.pre_authorized_code),
requestUriParameterSupported = true,
subjectTypesSupported = setOf(SubjectType.public),
credentialIssuer = baseUrl, // (EBSI) this should be just "$baseUrl" https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#section-11.2.1
credentialIssuer = baseUrl,
responseTypesSupported = setOf(
"code",
"vp_token",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,28 @@ sealed class CredentialOffer() : JsonDataObject() {
supportedCredentialIds.add(supportedCredentialId)
}

fun addAuthorizationCodeGrant(issuerState: String? = null, authorizationServer: String? = null) = this.also {
grants[GrantType.authorization_code.value] = GrantDetails(issuerState = issuerState, authorizationServer = authorizationServer)
fun addAuthorizationCodeGrant(
issuerState: String? = null,
authorizationServer: String? = null
) = this.also {
grants[GrantType.authorization_code.value] = GrantDetails(
issuerState = issuerState,
authorizationServer = authorizationServer
)
}

fun addPreAuthorizedCodeGrant(preAuthCode: String, txCode: TxCode? = null, interval: Int? = null, authorizationServer: String? = null) = this.also {
grants[GrantType.pre_authorized_code.value] =
GrantDetails(preAuthorizedCode = preAuthCode, txCode = txCode, interval = interval, authorizationServer = authorizationServer)
fun addPreAuthorizedCodeGrant(
preAuthCode: String,
txCode: TxCode? = null,
interval: Int? = null,
authorizationServer: String? = null
) = this.also {
grants[GrantType.pre_authorized_code.value] = GrantDetails(
preAuthorizedCode = preAuthCode,
txCode = txCode,
interval = interval,
authorizationServer = authorizationServer
)
}

protected abstract fun buildInternal(): T
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ data class ProofOfPossession @OptIn(ExperimentalSerializationApi::class) private
object ProofOfPossessionSerializer : JsonDataObjectSerializer<ProofOfPossession>(ProofOfPossession.serializer())

enum class ProofType {
jwt, cwt, ldp_vp
jwt,
cwt,
ldp_vp
}

@Serializable
Expand Down

0 comments on commit e10209e

Please sign in to comment.