Skip to content

oidcext:OIDCByte

Scott Cantor edited this page Feb 16, 2021 · 12 revisions

OIDCBytencoder encodes an IdPAttribute with binary values as a JSON object with Base64 string value. If IdPAttribute has multiple binary values the resulting Base64 strings are catenated to a single string value with space as delimeter. Multiple values may be encoded also as JSON array. Base64 encoding may be replaced with presenting the byte buffer as JSON integer array.

Schema Name and Location

This xsi:type is defined by the org.geant.idpextension.oidc.attribute.encoder schema, which is located at https://github.com/CSCfi/shibboleth-idp-oidc-extension/blob/master/idp-oidc-extension-impl/src/main/resources/schema/idp-oidc-extension-attribute-encoder.xsd and used by the reference installation from classpath:/schema/idp-oidc-extension-attribute-encoder.xsd

JSON Encoder Attributes

  • asInt, present each byte value as a JSON integer. Values are always set to JSON array. Default value is "false".
  • asArray, set values to JSON Array. Default value is "false".
  • stringDelimiter, delimiter used when catenating multiple values to single string. Default is " ".
  • setToToken, Default is "false". If set to true the value is to encoded to Authorization Code or to Access Token to ensure availability in Token and Userinfo endpoints.
  • placeToIDToken, Default is "false". By default attributes are delivered in userinfo response unless response type is "id_token". Setting the flag true will include attribute in id token regardless of response type.
  • denyUserinfo, Default is "false". By default attributes are delivered in userinfo response unless response type is "id_token". Setting the flag true excludes attribute from userinfo response.

Example

<AttributeEncoder xsi:type="oidcext:OIDCByte" name="logo"/>
<AttributeEncoder xsi:type="oidcext:OIDCByte" asInt="true" name="buffer"/>

(Migrated)