Skip to content

Commit

Permalink
Fix SPID AuthContextClassRef request support for Keycloak 11
Browse files Browse the repository at this point in the history
  • Loading branch information
lscorcia committed Aug 21, 2020
1 parent 1922bc8 commit 18bb84f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,7 @@ private List<String> getAuthnContextClassRefUris() {
if (authnContextClassRefs == null || authnContextClassRefs.length() == 0)
return output;

try {
AuthnContextClassRefJsonObject[] jsonObjects = JsonSerialization.readValue(authnContextClassRefs, AuthnContextClassRefJsonObject[].class);

for (AuthnContextClassRefJsonObject jsonObject: jsonObjects)
output.add(jsonObject.uri);
} catch (Exception e) {
logger.warn("Could not json-deserialize AuthContextClassRefs config entry: " + authnContextClassRefs, e);
}
output.add(authnContextClassRefs);

return output;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="attributeConsumingServiceIndex">{{:: 'identity-provider.saml.attribute-consuming-service-index' | translate}}</label>
<div class="col-md-6 time-selector">
<div class="col-md-6">
<input class="form-control" string-to-number type="number" min="0" max="2147483" step="1" ng-model="identityProvider.config.attributeConsumingServiceIndex" id="attributeConsumingServiceIndex"/>
</div>
<kc-tooltip>{{:: 'identity-provider.saml.attribute-consuming-service-index.tooltip' | translate}}</kc-tooltip>
Expand All @@ -299,49 +299,12 @@
<kc-tooltip>{{:: 'identity-provider.saml.authncontext-comparison-type.tooltip' | translate}}</kc-tooltip>
</div>
<div class="form-group">
<label for="type" class="col-md-2 control-label">{{:: 'identity-provider.saml.authncontext-class-ref' | translate}}</label>
<label for="type" class="col-md-2 control-label" for="authncontextClassref">{{:: 'identity-provider.saml.authncontext-class-ref' | translate}}</label>
<div class="col-sm-4">
<div class="input-group" ng-repeat="(i, authnContextClassRef) in authnContextClassRefs track by $index">
<input class="form-control" ng-model="authnContextClassRefs[i].uri">
<div class="input-group-btn">
<button class="btn btn-default" type="button" data-ng-click="deleteAuthnContextClassRef($index)">
<span class="fa fa-minus"></span>
</button>
</div>
</div>
<div class = "input-group">
<input class="form-control" ng-model="newAuthnContextClassRef" id="newAuthnContextClassRef">
<div class="input-group-btn">
<button class="btn btn-default" type="button" data-ng-click="newAuthnContextClassRef.length > 0 && addAuthnContextClassRef()">
<span class="fa fa-plus"></span>
</button>
</div>
</div>
<input class="form-control" id="authncontextClassref" ng-model="identityProvider.config.authnContextClassRefs" />
</div>
<kc-tooltip>{{:: 'identity-provider.saml.authncontext-class-ref.tooltip' | translate}}</kc-tooltip>
</div>
<div class="form-group">
<label for="type" class="col-md-2 control-label">{{:: 'identity-provider.saml.authncontext-decl-ref' | translate}}</label>
<div class="col-sm-4">
<div class="input-group" ng-repeat="(i, authnContextDeclRef) in authnContextDeclRefs track by $index">
<input class="form-control" ng-model="authnContextDeclRefs[i].uri">
<div class="input-group-btn">
<button class="btn btn-default" type="button" data-ng-click="deleteAuthnContextDeclRef($index)">
<span class="fa fa-minus"></span>
</button>
</div>
</div>
<div class = "input-group">
<input class="form-control" ng-model="newAuthnContextDeclRef" id="newAuthnContextDeclRef">
<div class="input-group-btn">
<button class="btn btn-default" type="button" data-ng-click="newAuthnContextDeclRef.length > 0 && addAuthnContextDeclRef()">
<span class="fa fa-plus"></span>
</button>
</div>
</div>
</div>
<kc-tooltip>{{:: 'identity-provider.saml.authncontext-decl-ref.tooltip' | translate}}</kc-tooltip>
</div>
</fieldset>
<fieldset data-ng-show="newIdentityProvider">
<legend uncollapsed><span class="text">{{:: 'import-external-idp-config' | translate}}</span> <kc-tooltip>{{:: 'import-external-idp-config.tooltip' | translate}}</kc-tooltip></legend>
Expand Down

0 comments on commit 18bb84f

Please sign in to comment.