use of alfio.manager.openid.AdminOpenIdAuthenticationManager in project alf.io by alfio-event.
the class AdminOpenIdAuthenticationManagerTest method setUp.
@BeforeEach
void setUp() {
environment = mock(Environment.class);
when(environment.getProperty(eq("openid.domain"))).thenReturn(DOMAIN);
when(environment.getProperty(eq("openid.clientId"))).thenReturn(CLIENT_ID);
when(environment.getProperty(eq("openid.clientSecret"))).thenReturn(CLIENT_SECRET);
when(environment.getProperty(eq("openid.callbackURI"), anyString())).thenReturn(CALLBACK_URI);
when(environment.getProperty(eq("openid.authenticationUrl"))).thenReturn(AUTHENTICATION_URL);
when(environment.getProperty(eq("openid.tokenEndpoint"), anyString())).thenReturn(CLAIMS_URI);
when(environment.getProperty(eq("openid.contentType"), anyString())).thenReturn(CONTENT_TYPE);
when(environment.getProperty(eq("openid.rolesParameter"))).thenReturn(GROUPS_NAME);
when(environment.getProperty(eq("openid.alfioGroupsParameter"))).thenReturn(ALFIO_GROUPS_NAME);
when(environment.getProperty(eq("openid.logoutUrl"))).thenReturn(LOGOUT_URL);
when(environment.getProperty(eq("openid.logoutRedirectUrl"), anyString())).thenReturn(LOGOUT_REDIRECT_URL);
var configurationManager = mock(ConfigurationManager.class);
when(configurationManager.getFor(eq(ConfigurationKeys.BASE_URL), any())).thenReturn(new ConfigurationManager.MaybeConfiguration(ConfigurationKeys.BASE_URL, new ConfigurationKeyValuePathLevel("", "blabla", ConfigurationPathLevel.SYSTEM)));
authenticationManager = new AdminOpenIdAuthenticationManager(environment, null, configurationManager, null, null, null, null, null, null, null, new Json());
}
Aggregations