@Override public OAuthAppSettings produce(CreationalContext<OAuthAppSettings> ctx) { OAuthAppSettings settings = oldProducer.produce(ctx); OAuthAppSettings newSettings = new SimpleOAuthAppSettingsBuilder().readFromSettings(settings). qualifier(qual). name(AgoravaContext.getQualifierToService().get(qual)).build(); ctx.push(newSettings); return newSettings; }
@Override public OAuthAppSettings tune(OAuthAppSettings toTune) { return new SimpleOAuthAppSettingsBuilder() .readFromSettings(toTune) .callback(new FacesUrlTransformer(toTune.getCallback()) .appendParamIfNecessary(AgoravaConstants.SESSIONID_PARAM, session.getId()).getUrl()) .build(); } }