@Test public void register_withOidcDcrDisabled() { when(domain.isDynamicClientRegistrationEnabled()).thenReturn(false); handler.handle(context); ArgumentCaptor<Throwable> exceptionCaptor = ArgumentCaptor.forClass(Throwable.class); verify(context, times(1)).fail(exceptionCaptor.capture()); Assert.assertTrue("Should return a DCR disabled exception", exceptionCaptor.getValue() instanceof ClientRegistrationForbiddenException); }
@Override public void handle(RoutingContext context) { if(domain.isOpenDynamicClientRegistrationEnabled()) { LOGGER.debug("Open Dynamic client registration is enabled - no security will be performed."); context.next(); return; } if(!domain.isDynamicClientRegistrationEnabled()) { LOGGER.debug("Dynamic client registration is disabled"); context.fail(new ClientRegistrationForbiddenException()); return; } this.oAuth2AuthHandler.handle(context); }
DynamicClientRegistrationHandler implements Handler<RoutingContext> { @Override public void handle(RoutingContext context) { if(domain.isOpenDynamicClientRegistrationEnabled()) { LOGGER.debug("Open Dynamic client registration is enabled - no security will be performed."); context.next(); return; } if(!domain.isDynamicClientRegistrationEnabled()) { LOGGER.debug("Dynamic client registration is disabled"); context.fail(new ClientRegistrationForbiddenException()); return; } this.oAuth2AuthHandler.handle(context); } }
DynamicClientRegistrationHandler implements Handler<RoutingContext> { @Override public void handle(RoutingContext context) { if(domain.isOpenDynamicClientRegistrationEnabled()) { LOGGER.debug("Open Dynamic client registration is enabled - no security will be performed."); context.next(); return; } if(!domain.isDynamicClientRegistrationEnabled()) { LOGGER.debug("Dynamic client registration is disabled"); context.fail(new ClientRegistrationForbiddenException()); return; } this.oAuth2AuthHandler.handle(context); } DynamicClientRegistrationHandler(Domain domain, OAuth2AuthHandler oAuth2AuthHandler); }
DynamicClientRegistrationHandler implements Handler<RoutingContext> { @Override public void handle(RoutingContext context) { if(domain.isOpenDynamicClientRegistrationEnabled()) { LOGGER.debug("Open Dynamic client registration is enabled - no security will be performed."); context.next(); return; } if(!domain.isDynamicClientRegistrationEnabled()) { LOGGER.debug("Dynamic client registration is disabled"); context.fail(new ClientRegistrationForbiddenException()); return; } this.oAuth2AuthHandler.handle(context); } DynamicClientRegistrationHandler(Domain domain, OAuth2AuthHandler oAuth2AuthHandler); @Override void handle(RoutingContext context); }
DynamicClientRegistrationHandler implements Handler<RoutingContext> { @Override public void handle(RoutingContext context) { if(domain.isOpenDynamicClientRegistrationEnabled()) { LOGGER.debug("Open Dynamic client registration is enabled - no security will be performed."); context.next(); return; } if(!domain.isDynamicClientRegistrationEnabled()) { LOGGER.debug("Dynamic client registration is disabled"); context.fail(new ClientRegistrationForbiddenException()); return; } this.oAuth2AuthHandler.handle(context); } DynamicClientRegistrationHandler(Domain domain, OAuth2AuthHandler oAuth2AuthHandler); @Override void handle(RoutingContext context);  }