@Test public void init() throws IOException { setSettings(true); DumbInitContext context = new DumbInitContext(); underTest.init(context); verify(context.response).sendRedirect(anyString()); assertThat(context.generateCsrfState.get()).isTrue(); }
@Override public void init(InitContext context) { try { Auth auth = newAuth(initSettings(context.getCallbackUrl()), context.getRequest(), context.getResponse()); auth.login(context.generateCsrfState()); } catch (IOException | SettingsException e) { throw new IllegalStateException("Fail to intialize SAML authentication plugin", e); } }
SamlIdentityProvider implements OAuth2IdentityProvider { @Override public void init(InitContext context) { try { Auth auth = newAuth(initSettings(context.getCallbackUrl()), context.getRequest(), context.getResponse()); auth.login(context.generateCsrfState()); } catch (IOException | SettingsException e) { throw new IllegalStateException("Fail to intialize SAML authentication plugin", e); } } }
SamlIdentityProvider implements OAuth2IdentityProvider { @Override public void init(InitContext context) { try { Auth auth = newAuth(initSettings(context.getCallbackUrl()), context.getRequest(), context.getResponse()); auth.login(context.generateCsrfState()); } catch (IOException | SettingsException e) { throw new IllegalStateException("Fail to intialize SAML authentication plugin", e); } } SamlIdentityProvider(SamlSettings samlSettings); }
SamlIdentityProvider implements OAuth2IdentityProvider { @Override public void init(InitContext context) { try { Auth auth = newAuth(initSettings(context.getCallbackUrl()), context.getRequest(), context.getResponse()); auth.login(context.generateCsrfState()); } catch (IOException | SettingsException e) { throw new IllegalStateException("Fail to intialize SAML authentication plugin", e); } } SamlIdentityProvider(SamlSettings samlSettings); @Override String getKey(); @Override String getName(); @Override Display getDisplay(); @Override boolean isEnabled(); @Override boolean allowsUsersToSignUp(); @Override void init(InitContext context); @Override void callback(CallbackContext context); }
SamlIdentityProvider implements OAuth2IdentityProvider { @Override public void init(InitContext context) { try { Auth auth = newAuth(initSettings(context.getCallbackUrl()), context.getRequest(), context.getResponse()); auth.login(context.generateCsrfState()); } catch (IOException | SettingsException e) { throw new IllegalStateException("Fail to intialize SAML authentication plugin", e); } } SamlIdentityProvider(SamlSettings samlSettings); @Override String getKey(); @Override String getName(); @Override Display getDisplay(); @Override boolean isEnabled(); @Override boolean allowsUsersToSignUp(); @Override void init(InitContext context); @Override void callback(CallbackContext context);  }