/** {@inheritDoc} */ @Override protected void buildAuthenticationResult(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { super.buildAuthenticationResult(profileRequestContext, authenticationContext); // Bypass c14n. We already operate on a canonical name, so just re-confirm it. profileRequestContext.getSubcontext(SubjectCanonicalizationContext.class, true).setPrincipalName(username); }
/** {@inheritDoc} */ @Override protected void buildAuthenticationResult(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { super.buildAuthenticationResult(profileRequestContext, authenticationContext); // Bypass c14n. We already operate on a canonical name, so just re-confirm it. profileRequestContext.getSubcontext(SubjectCanonicalizationContext.class, true).setPrincipalName(username); }
/** {@inheritDoc} */ @Override protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final SubjectCanonicalizationContext c14nContext) { c14nContext.setPrincipalName(applyTransforms(usernamePrincipal.getName())); }
/** {@inheritDoc} */ @Override protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final SubjectCanonicalizationContext c14nContext) { final Set<NameIDPrincipal> nameIDs = c14nContext.getSubject().getPrincipals(NameIDPrincipal.class); final NameID nameID = nameIDs.iterator().next().getNameID(); try { c14nContext.setPrincipalName(decoder.decode(c14nContext, nameID)); if (c14nContext.getPrincipalName() == null) { ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.INVALID_SUBJECT); } } catch (final NameDecoderException e) { c14nContext.setException(e); ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.SUBJECT_C14N_ERROR); } }
/** {@inheritDoc} */ @Override protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final SubjectCanonicalizationContext c14nContext) { final Set<NameIdentifierPrincipal> nameIdentifiers = c14nContext.getSubject().getPrincipals(NameIdentifierPrincipal.class); final NameIdentifier nameIdentifier = nameIdentifiers.iterator().next().getNameIdentifier(); try { c14nContext.setPrincipalName(decoder.decode(c14nContext, nameIdentifier)); if (c14nContext.getPrincipalName() == null) { ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.INVALID_SUBJECT); } } catch (final NameDecoderException e) { c14nContext.setException(e); ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.SUBJECT_C14N_ERROR); } }
if (altname instanceof String) { log.debug("{} Extracted String-valued subjectAltName: {}", getLogPrefix(), altname); c14nContext.setPrincipalName(applyTransforms((String) altname)); return; if (rdn != null) { log.debug("{} Extracted RDN with OID {}: {}", getLogPrefix(), oid, rdn); c14nContext.setPrincipalName(applyTransforms(rdn)); return;
c14nContext.setPrincipalName(applyTransforms(((StringAttributeValue) val).getValue())); return; } else if (val instanceof ScopedStringAttributeValue) { log.debug("{} Using attribute {} scoped value {} as input to transforms", getLogPrefix(), id, withScope); c14nContext.setPrincipalName(applyTransforms(withScope)); return; } else {
c14nContext.setPrincipalName(decodedPrincipal); } catch (final ResolutionException e) { c14nContext.setException(e);