|
18 | 18 | use SimpleSAML\Module\oidc\Utils\Routes; |
19 | 19 | use SimpleSAML\OpenID\Codebooks\ClaimsEnum; |
20 | 20 | use SimpleSAML\OpenID\Codebooks\CredentialFormatIdentifiersEnum; |
| 21 | +use SimpleSAML\OpenID\Codebooks\LanguageTagsEnum; |
21 | 22 | use Symfony\Component\HttpFoundation\Response; |
22 | 23 |
|
23 | 24 | class CredentialIssuerConfigurationController |
@@ -48,7 +49,7 @@ public function configuration(): Response |
48 | 49 | // authorization_servers |
49 | 50 |
|
50 | 51 | // REQUIRED |
51 | | - // TODO credential_endpoint |
| 52 | + ClaimsEnum::CredentialEndpoint->value => $this->routes->urlCredentialIssuerCredential(), |
52 | 53 |
|
53 | 54 | // OPTIONAL |
54 | 55 | // nonce_endpoint |
@@ -81,7 +82,9 @@ public function configuration(): Response |
81 | 82 |
|
82 | 83 | ClaimsEnum::CredentialConfigurationsSupported->value => [ |
83 | 84 | 'ResearchAndScholarshipCredentialJwtVcJson' => [ |
| 85 | + // REQUIRED |
84 | 86 | ClaimsEnum::Format->value => CredentialFormatIdentifiersEnum::JwtVcJson->value, |
| 87 | + // OPTIONAL |
85 | 88 | ClaimsEnum::Scope->value => 'ResearchAndScholarshipCredentialJwtVcJson', |
86 | 89 |
|
87 | 90 | // OPTIONAL |
@@ -117,10 +120,141 @@ public function configuration(): Response |
117 | 120 | ], |
118 | 121 | ], |
119 | 122 |
|
120 | | - // As per appendix A.1.1.2. https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-vc-signed-as-a-jwt-not-usin |
| 123 | + // OPTIONAL A.1.1.2. https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-vc-signed-as-a-jwt-not-usin |
121 | 124 | ClaimsEnum::Claims->value => [ |
| 125 | + /** |
| 126 | + * https://refeds.org/category/research-and-scholarship |
| 127 | + * |
| 128 | + * The R&S attribute bundle consists (abstractly) of the following required data elements: |
| 129 | + * |
| 130 | + * shared user identifier |
| 131 | + * person name |
| 132 | + * email address |
| 133 | + * |
| 134 | + * and one optional data element: |
| 135 | + * |
| 136 | + * affiliation |
| 137 | + * |
| 138 | + * where shared user identifier is a persistent, non-reassigned, non-targeted identifier |
| 139 | + * defined to be either of the following: |
| 140 | + * |
| 141 | + * eduPersonPrincipalName (if non-reassigned) |
| 142 | + * eduPersonPrincipalName + eduPersonTargetedID |
| 143 | + * |
| 144 | + * and where person name is defined to be either (or both) of the following: |
| 145 | + * |
| 146 | + * displayName |
| 147 | + * givenName + sn |
| 148 | + * |
| 149 | + * and where email address is defined to be the mail attribute, |
| 150 | + * |
| 151 | + * and where affiliation is defined to be the eduPersonScopedAffiliation attribute. |
| 152 | + * |
| 153 | + * All of the above attributes are defined or referenced in the [eduPerson] specification. The |
| 154 | + * specific naming and format of these attributes is guided by the protocol in use. For SAML |
| 155 | + * 2.0 the [SAMLAttr] profile MUST be used. This specification may be extended to reference |
| 156 | + * other protocol-specific formulations as circumstances warrant. |
| 157 | + */ |
| 158 | + [ |
| 159 | + // REQUIRED |
| 160 | + ClaimsEnum::Path->value => [ |
| 161 | + ClaimsEnum::Credential_Subject->value, |
| 162 | + 'eduPersonPrincipalName', |
| 163 | + ], |
| 164 | + // OPTIONAL |
| 165 | + ClaimsEnum::Mandatory->value => true, |
| 166 | + // OPTIONAL |
| 167 | + ClaimsEnum::Display->value => [ |
| 168 | + [ |
| 169 | + // OPTIONAL |
| 170 | + ClaimsEnum::Name->value => 'Principal Name', |
| 171 | + // OPTIONAL |
| 172 | + ClaimsEnum::Locale->value => LanguageTagsEnum::EnUs->value, |
| 173 | + ], |
| 174 | + ], |
| 175 | + ], |
| 176 | + [ |
| 177 | + ClaimsEnum::Path->value => [ |
| 178 | + ClaimsEnum::Credential_Subject->value, |
| 179 | + 'eduPersonTargetedID', |
| 180 | + ], |
| 181 | + ClaimsEnum::Mandatory->value => false, |
| 182 | + ClaimsEnum::Display->value => [ |
| 183 | + [ |
| 184 | + ClaimsEnum::Name->value => 'Targeted ID', |
| 185 | + ClaimsEnum::Locale->value => LanguageTagsEnum::EnUs->value, |
| 186 | + ], |
| 187 | + ], |
| 188 | + ], |
| 189 | + [ |
| 190 | + ClaimsEnum::Path->value => [ |
| 191 | + ClaimsEnum::Credential_Subject->value, |
| 192 | + 'displayName', |
| 193 | + ], |
| 194 | + ClaimsEnum::Mandatory->value => false, |
| 195 | + ClaimsEnum::Display->value => [ |
| 196 | + [ |
| 197 | + ClaimsEnum::Name->value => 'Display Name', |
| 198 | + ClaimsEnum::Locale->value => LanguageTagsEnum::EnUs->value, |
| 199 | + ], |
| 200 | + ], |
| 201 | + ], |
122 | 202 | [ |
| 203 | + ClaimsEnum::Path->value => [ |
| 204 | + ClaimsEnum::Credential_Subject->value, |
| 205 | + 'givenName', |
| 206 | + ], |
| 207 | + ClaimsEnum::Mandatory->value => false, |
| 208 | + ClaimsEnum::Display->value => [ |
| 209 | + [ |
| 210 | + ClaimsEnum::Name->value => 'Given Name', |
| 211 | + ClaimsEnum::Locale->value => LanguageTagsEnum::EnUs->value, |
| 212 | + ], |
| 213 | + ], |
| 214 | + ], |
| 215 | + [ |
| 216 | + ClaimsEnum::Path->value => [ |
| 217 | + ClaimsEnum::Credential_Subject->value, |
| 218 | + 'sn', |
| 219 | + ], |
| 220 | + ClaimsEnum::Display->value => [ |
| 221 | + [ |
| 222 | + ClaimsEnum::Name->value => 'Last Name', |
| 223 | + ClaimsEnum::Locale->value => LanguageTagsEnum::EnUs->value, |
| 224 | + ], |
| 225 | + ], |
| 226 | + ], |
| 227 | + [ |
| 228 | + ClaimsEnum::Path->value => [ |
| 229 | + ClaimsEnum::Credential_Subject->value, |
| 230 | + 'mail', |
| 231 | + ], |
| 232 | + ClaimsEnum::Display->value => [ |
| 233 | + [ |
| 234 | + ClaimsEnum::Name->value => 'Email Address', |
| 235 | + ClaimsEnum::Locale->value => LanguageTagsEnum::EnUs->value, |
| 236 | + ], |
| 237 | + ], |
| 238 | + ], |
| 239 | + [ |
| 240 | + ClaimsEnum::Path->value => [ |
| 241 | + ClaimsEnum::Credential_Subject->value, |
| 242 | + 'eduPersonScopedAffiliation', |
| 243 | + ], |
| 244 | + ClaimsEnum::Display->value => [ |
| 245 | + [ |
| 246 | + ClaimsEnum::Name->value => 'Scoped Affiliation', |
| 247 | + ClaimsEnum::Locale->value => LanguageTagsEnum::EnUs->value, |
| 248 | + ], |
| 249 | + ], |
| 250 | + ], |
| 251 | + ], |
123 | 252 |
|
| 253 | + // REQUIRED |
| 254 | + ClaimsEnum::CredentialDefinition->value => [ |
| 255 | + ClaimsEnum::Type->value => [ |
| 256 | + 'VerifiableCredential', // TODO mivanci CredentialTypesEnum |
| 257 | + 'ResearchAndScholarshipCredentialJwtVcJson', |
124 | 258 | ], |
125 | 259 | ], |
126 | 260 | ], |
|
0 commit comments