id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
3382195_200
{ "fields": [ { "declarator": "mockMvc", "modifier": "private", "original_string": "private MockMvc mockMvc;", "type": "MockMvc", "var_name": "mockMvc" }, { "declarator": "webApplicationContext", "modifier": "@Autowired", "original_string": "@Autowired\n ...
{ "body": "@Test\n public void acceptInvitePage_for_verifiedUser() throws Exception {\n UaaUser user = new UaaUser(\"user@example.com\", \"\", \"user@example.com\", \"Given\", \"family\");\n user.modifyId(\"verified-user\");\n user.setVerified(true);\n when(userDatabase.retrieveUserById...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(InvitationsController.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(InvitationsController.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@RequestMapping(value = \"/accept.do\", method = POST)\n public String acceptInvitation(@RequestParam(\"password\") String password,\n @RequestParam(\"password_confirmation\") String passwordConfirmation,\n @RequestParam(\"code\") Strin...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_57
{ "fields": [ { "declarator": "HTTP_HOST_PROPERTY = \"http.proxyHost\"", "modifier": "private static final", "original_string": "private static final String HTTP_HOST_PROPERTY = \"http.proxyHost\";", "type": "String", "var_name": "HTTP_HOST_PROPERTY" }, { "declarator": ...
{ "body": "@Test\n public void skipSslValidation() {\n RestTemplate restTemplate = new RestTemplate(createRequestFactory(true, 10_000));\n assertEquals(OK, restTemplate.getForEntity(httpsUrl, String.class).getStatusCode());\n }", "class_method_signature": "UaaHttpRequestUtilsTest.skipSslValidati...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(UaaHttpRequestUtils.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(UaaHttpRequestUtils.class);", "type": "Logger", "var_name": "logger" } ], "fil...
{ "body": "public static ClientHttpRequestFactory createRequestFactory(boolean skipSslValidation, int timeout) {\n return createRequestFactory(getClientBuilder(skipSslValidation), timeout);\n }", "class_method_signature": "UaaHttpRequestUtils.createRequestFactory(boolean skipSslValidation, int timeout)", ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_345
{ "fields": [ { "declarator": "oAuth2RequestFactory", "modifier": "private", "original_string": "private OAuth2RequestFactory oAuth2RequestFactory;", "type": "OAuth2RequestFactory", "var_name": "oAuth2RequestFactory" }, { "declarator": "uaaAuthorizationEndpoint", ...
{ "body": "@Test\n public void testGetGrantType_code_and_token_is_implicit() {\n responseTypes.add(\"code\");\n responseTypes.add(\"token\");\n assertEquals(GRANT_TYPE_IMPLICIT, uaaAuthorizationEndpoint.deriveGrantTypeFromResponseType(responseTypes));\n }", "class_method_signature": "UaaA...
{ "fields": [ { "declarator": "AUTHORIZATION_REQUEST = \"authorizationRequest\"", "modifier": "public static final", "original_string": "public static final String AUTHORIZATION_REQUEST = \"authorizationRequest\";", "type": "String", "var_name": "AUTHORIZATION_REQUEST" }, { ...
{ "body": "protected String deriveGrantTypeFromResponseType(Set<String> responseTypes) {\n if (responseTypes.contains(\"token\")) {\n return GRANT_TYPE_IMPLICIT;\n } else if (responseTypes.size() == 1 && responseTypes.contains(\"id_token\")) {\n return GRANT_TYPE_IMPLICIT;\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_191
{ "fields": [ { "declarator": "emailChangeEmailService", "modifier": "private", "original_string": "private EmailChangeEmailService emailChangeEmailService;", "type": "EmailChangeEmailService", "var_name": "emailChangeEmailService" }, { "declarator": "mockScimUserProvis...
{ "body": "@Test\n void completeVerificationWithInvalidIntent() {\n when(mockExpiringCodeStore.retrieveCode(\"invalid_code\", zoneId)).thenReturn(new ExpiringCode(\"invalid_code\", new Timestamp(System.currentTimeMillis()), null, \"invalid-intent\"));\n\n Assertions.assertThrows(UaaException.class,\n...
{ "fields": [ { "declarator": "CHANGE_EMAIL_REDIRECT_URL = \"change_email_redirect_url\"", "modifier": "static final", "original_string": "static final String CHANGE_EMAIL_REDIRECT_URL = \"change_email_redirect_url\";", "type": "String", "var_name": "CHANGE_EMAIL_REDIRECT_URL" },...
{ "body": "@Override\n public Map<String, String> completeVerification(String code) {\n ExpiringCode expiringCode = codeStore.retrieveCode(code, identityZoneManager.getCurrentIdentityZoneId());\n if ((null == expiringCode) || ((null != expiringCode.getIntent()) && !EMAIL.name().equals(expiringCode.ge...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_484
{ "fields": [ { "declarator": "mfaProviderProvisioning", "modifier": "private", "original_string": "private JdbcMfaProviderProvisioning mfaProviderProvisioning;", "type": "JdbcMfaProviderProvisioning", "var_name": "mfaProviderProvisioning" }, { "declarator": "mfaProvide...
{ "body": "@Test\n void retrieve() {\n MfaProvider mfaProvider = constructGoogleProvider();\n doNothing().when(mfaProviderValidator);\n String zoneId = IdentityZoneHolder.get().getId();\n MfaProvider created = mfaProviderProvisioning.create(mfaProvider, zoneId);\n assertEquals(mf...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JdbcMfaProviderProvisioning.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(JdbcMfaProviderProvisioning.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public MfaProvider retrieve(String id, String zoneId) {\n return jdbcTemplate.queryForObject(MFA_PROVIDER_BY_ID_QUERY, mapper, id, zoneId);\n }", "class_method_signature": "JdbcMfaProviderProvisioning.retrieve(String id, String zoneId)", "constructor": false, "full_signature"...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_257
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/provider/saml/LoginSAMLAuthenticationFailureHandlerTest.java", "identifier": "LoginSAMLAuthenticationFailureHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testErrorRedirect() throws IOException, ServletException {\n LoginSAMLAuthenticationFailureHandler handler = new LoginSAMLAuthenticationFailureHandler();\n\n DefaultSavedRequest savedRequest = mock(DefaultSavedRequest.class);\n Map<String, String[]> parameterMap ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(LoginSAMLAuthenticationFailureHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(LoginSAMLAuthenticationFailureHandler.class);", "type": "Logger", ...
{ "body": "@Override\n public void onAuthenticationFailure(final HttpServletRequest request, final HttpServletResponse response,\n final AuthenticationException exception) throws IOException, ServletException {\n\n String redirectTo = null;\n\n if (exception instanceof LoginSAMLException) ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_312
{ "fields": [ { "declarator": "factory", "modifier": "private", "original_string": "private CurrentUserCookieFactory factory;", "type": "CurrentUserCookieFactory", "var_name": "factory" }, { "declarator": "sessionTimeout", "modifier": "private", "original_st...
{ "body": "@Test\n void getCookie_isNotHttpOnlyBecauseSingularReadsFromBrowserJS() throws Exception {\n // JavaScript running on the UAA's session_management page will not be able to interact with this\n // cookie if httpOnly is enabled.\n\n Cookie cookie = factory.getCookie(uaaPrincipal);\n ...
{ "fields": [ { "declarator": "CURRENT_USER_COOKIE_NAME = \"Current-User\"", "modifier": "public", "original_string": "public String CURRENT_USER_COOKIE_NAME = \"Current-User\";", "type": "String", "var_name": "CURRENT_USER_COOKIE_NAME" }, { "declarator": "secure", ...
{ "body": "public Cookie getCookie(UaaPrincipal uaaPrincipal) throws CurrentUserCookieEncodingException {\n CurrentUserInformation currentUserInformation = new CurrentUserInformation();\n currentUserInformation.setUserId(uaaPrincipal.getId());\n Cookie cookie = new Cookie(CURRENT_USER_COOKIE_NAME...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_98
{ "fields": [ { "declarator": "invalidWildCardUrls = Arrays.asList(\n \"*\",\n \"**\",\n \"*/**\",\n \"**/*\",\n \"*/*\",\n \"**/**\")", "modifier": "private", "original_string": "private List<String> invalidWildCardUrls = Arrays....
{ "body": "@Test\n void validateInvalidSubdomains() {\n invalidSubdomains.forEach(testString -> assertFalse(UaaUrlUtils.isValidSubdomain(testString)));\n }", "class_method_signature": "UaaUrlUtilsTest.validateInvalidSubdomains()", "constructor": false, "full_signature": "@Test void validateInvalidS...
{ "fields": [ { "declarator": "VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\")", "modifier": "private static final", "original_string": "private static final Pattern VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-...
{ "body": "public static boolean isValidSubdomain(String subdomain) {\n return VALID_SUBDOMAIN_PATTERN.matcher(subdomain).matches();\n }", "class_method_signature": "UaaUrlUtils.isValidSubdomain(String subdomain)", "constructor": false, "full_signature": "public static boolean isValidSubdomain(String ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_365
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator": "gr...
{ "body": "@Test(expected = InvalidGrantException.class)\n public void test_missing_token_Request() {\n granter.validateRequest(null);\n }", "class_method_signature": "Saml2TokenGranterTest.test_missing_token_Request()", "constructor": false, "full_signature": "@Test(expected = InvalidGrantException.class)...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(Saml2TokenGranter.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(Saml2TokenGranter.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "protected Authentication validateRequest(TokenRequest request) {\n // things to validate\n if(request == null || request.getRequestParameters() == null) {\n throw new InvalidGrantException(\"Missing token request object\");\n }\n if(request.getRequestParameters().get(...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_220
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void valid_ldap_origin() {\n IdentityProvider<LdapIdentityProviderDefinition> ldap = new IdentityProvider<>();\n ldap.setType(LDAP);\n ldap.setOriginKey(LDAP);\n doNothing().when(validator).validate(any(AbstractIdentityProviderDefinition.class));\n valid...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/provider/ldap/LdapIdentityProviderConfigValidator.java", "identifier": "LdapIdentityProviderConfigValidator", "interfaces": "", "methods": [ { "class_method_signature": "LdapIdentityProviderConfigValidator.validate(IdentityP...
{ "body": "@Override\n public void validate(IdentityProvider<? extends AbstractIdentityProviderDefinition> provider) {\n super.validate(provider);\n if (!LDAP.equals(provider.getOriginKey())) {\n throw new IllegalArgumentException(String.format(\"LDAP provider originKey must be set to '%s'...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_77
{ "fields": [ { "declarator": "invalidWildCardUrls = Arrays.asList(\n \"*\",\n \"**\",\n \"*/**\",\n \"**/*\",\n \"*/*\",\n \"**/**\")", "modifier": "private", "original_string": "private List<String> invalidWildCardUrls = Arrays....
{ "body": "@Test\n void localhostPortAndContextPathUrl() {\n MockHttpServletRequest request = new MockHttpServletRequest();\n request.setScheme(\"http\");\n request.setServerName(\"localhost\");\n request.setServerPort(8080);\n request.setContextPath(\"/uaa\");\n\n Servlet...
{ "fields": [ { "declarator": "VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\")", "modifier": "private static final", "original_string": "private static final Pattern VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-...
{ "body": "public static String getUaaUrl(String path, IdentityZone currentIdentityZone) {\n return getUaaUrl(path, false, currentIdentityZone);\n }", "class_method_signature": "UaaUrlUtils.getUaaUrl(String path, IdentityZone currentIdentityZone)", "constructor": false, "full_signature": "public stati...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_109
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/util/UaaTokenUtilsTest.java", "identifier": "UaaTokenUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = InvalidTokenException.class)\n public void getClaims_throwsExceptionWhenClaimsCannotBeRead() {\n Jwt encoded = JwtHelper.encode(\"great content\", KeyInfoBuilder.build(\"foo\", \"bar\", \"https://localhost/uaa\"));\n UaaTokenUtils.getClaims(encoded.getEncoded());\n }", ...
{ "fields": [ { "declarator": "jwtPattern = Pattern.compile(\"[a-zA-Z0-9_\\\\-\\\\\\\\=]*\\\\.[a-zA-Z0-9_\\\\-\\\\\\\\=]*\\\\.[a-zA-Z0-9_\\\\-\\\\\\\\=]*\")", "modifier": "public static final", "original_string": "public static final Pattern jwtPattern = Pattern.compile(\"[a-zA-Z0-9_\\\\-\\\\\\\...
{ "body": "public static Map<String, Object> getClaims(String jwtToken) {\n Jwt jwt;\n try {\n jwt = JwtHelper.decode(jwtToken);\n } catch (Exception ex) {\n throw new InvalidTokenException(\"Invalid token (could not decode): \" + jwtToken, ex);\n }\n\n Map<Str...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_298
{ "fields": [ { "declarator": "handler = new CsrfAwareEntryPointAndDeniedHandler(\"/csrf\", \"/login\")", "modifier": "protected", "original_string": "protected CsrfAwareEntryPointAndDeniedHandler handler = new CsrfAwareEntryPointAndDeniedHandler(\"/csrf\", \"/login\");", "type": "CsrfAwar...
{ "body": "@Test\n public void testHandleWhenNotLoggedInAndNoCsrf() throws Exception {\n AccessDeniedException ex = new MissingCsrfTokenException(\"something\");\n handler.handle(request, response, ex);\n assertEquals(HttpServletResponse.SC_FOUND, response.getStatus());\n assertSame(req...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(CsrfAwareEntryPointAndDeniedHandler.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(CsrfAwareEntryPointAndDeniedHandler.class);", "type": "Logger", "var_n...
{ "body": "@Override\n public void handle(HttpServletRequest request,\n HttpServletResponse response,\n AccessDeniedException accessDeniedException) throws IOException,\n ServletException {\n request.setAttribute(WebAttributes.ACCESS_DENIED_403, accessDenie...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_332
{ "fields": [ { "declarator": "base64EncodedImg = getResourceAsString(\n JdbcClientMetadataProvisioningTest.class,\n \"base64EncodedImg\")", "modifier": "private static final", "original_string": "private static final String base64EncodedImg = getResourceAsString(\n ...
{ "body": "@Test\n void update() throws Exception {\n jdbcTemplate.execute(insertIntoOauthClientDetails(clientId, identityZoneId));\n ClientMetadata newClientMetadata = createTestClientMetadata(\n clientId,\n false,\n new URL(\"http://updated.app/launch/ur...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JdbcClientMetadataProvisioning.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(JdbcClientMetadataProvisioning.class);", "type": "Logger", "var...
{ "body": "@Override\n public ClientMetadata update(ClientMetadata resource, String zoneId) {\n logger.debug(\"Updating metadata for client: \" + resource.getClientId());\n\n updateClientNameIfNotEmpty(resource, zoneId);\n int updated = jdbcTemplate.update(CLIENT_METADATA_UPDATE, ps -> {\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_20
{ "fields": [ { "declarator": "server", "modifier": "private", "original_string": "private MBeanServerConnection server;", "type": "MBeanServerConnection", "var_name": "server" }, { "declarator": "statsDClient", "modifier": "private", "original_string": "pri...
{ "body": "@Test\n void auditService_metrics_emitted() throws Exception {\n Mockito.when(metricsUtils.pullUpMap(\"cloudfoundry.identity\", \"*\", server)).thenReturn((Map) mBeanMap2);\n uaaMetricsEmitter.emitMetrics();\n Mockito.verify(statsDClient).gauge(\"audit_service.user_authentication_co...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(UaaMetricsEmitter.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(UaaMetricsEmitter.class);", "type": "Logger", "var_name": "logger" }, { "d...
{ "body": "@Scheduled(fixedRate = 5000, initialDelay = 0)\n public void emitMetrics() throws Exception {\n Map<String, Object> result = new LinkedHashMap<>();\n Map<String, ?> spring = metricsUtils.pullUpMap(\"cloudfoundry.identity\", \"*\", server);\n\n if (spring != null) {\n resu...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_277
{ "fields": [ { "declarator": "definition", "modifier": "private", "original_string": "private AbstractExternalOAuthIdentityProviderDefinition definition;", "type": "AbstractExternalOAuthIdentityProviderDefinition", "var_name": "definition" }, { "declarator": "validator...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void tokenKeyUrl_orTokenKeyMustBeSpecified() {\n definition.setTokenKey(null);\n definition.setTokenKeyUrl(null);\n validator.validate(definition);\n }", "class_method_signature": "ExternalOAuthIdentityProviderConfigVali...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/provider/oauth/ExternalOAuthIdentityProviderConfigValidator.java", "identifier": "ExternalOAuthIdentityProviderConfigValidator", "interfaces": "", "methods": [ { "class_method_signature": "ExternalOAuthIdentityProviderConfig...
{ "body": "@Override\n public void validate(AbstractIdentityProviderDefinition definition) {\n if (definition == null) {\n throw new IllegalArgumentException(\"Config cannot be null OAUTH2.0/OIDC1.0 provider\");\n }\n if (!(definition instanceof AbstractExternalOAuthIdentityProvider...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_324
{ "fields": [ { "declarator": "userId", "modifier": "private", "original_string": "private String userId;", "type": "String", "var_name": "userId" }, { "declarator": "endpoint", "modifier": "private", "original_string": "private TotpMfaEndpoint endpoint;", ...
{ "body": "@Test\n public void testNonNumericOTP() throws Exception{\n when(uaaAuthentication.getPrincipal()).thenReturn(new UaaPrincipal(userId, \"Marissa\", null, \"uaa\", null, null), null, null);\n when(mfaProviderProvisioning.retrieveByName(mfaProvider.getName(), IdentityZoneHolder.get().getId()...
{ "fields": [ { "declarator": "mfaCredentialsProvisioning", "modifier": "private final", "original_string": "private final UserGoogleMfaCredentialsProvisioning mfaCredentialsProvisioning;", "type": "UserGoogleMfaCredentialsProvisioning", "var_name": "mfaCredentialsProvisioning" }...
{ "body": "@RequestMapping(value = {\"/verify.do\"}, method = RequestMethod.POST)\n public ModelAndView validateCode(Model model,\n @RequestParam(\"code\") String code,\n @ModelAttribute(\"uaaMfaCredentials\") UserGoogleMfaCredentials credenti...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_261
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/provider/saml/LoginSAMLAuthenticationFailureHandlerTest.java", "identifier": "LoginSAMLAuthenticationFailureHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNoSavedRequest() throws IOException, ServletException {\n LoginSAMLAuthenticationFailureHandler handler = new LoginSAMLAuthenticationFailureHandler();\n\n DefaultSavedRequest savedRequest = mock(DefaultSavedRequest.class);\n Map<String, String[]> parameterMap...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(LoginSAMLAuthenticationFailureHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(LoginSAMLAuthenticationFailureHandler.class);", "type": "Logger", ...
{ "body": "@Override\n public void onAuthenticationFailure(final HttpServletRequest request, final HttpServletResponse response,\n final AuthenticationException exception) throws IOException, ServletException {\n\n String redirectTo = null;\n\n if (exception instanceof LoginSAMLException) ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_36
{ "fields": [ { "declarator": "TIMEOUT = 50", "modifier": "public static final", "original_string": "public static final int TIMEOUT = 50;", "type": "int", "var_name": "TIMEOUT" }, { "declarator": "timeService = new MockTimeService()", "modifier": "private", ...
{ "body": "@Test\n public void no_value() {\n assertNull(map.get(generator.generate()));\n }", "class_method_signature": "TimeBasedExpiringValueMapTest.no_value()", "constructor": false, "full_signature": "@Test public void no_value()", "identifier": "no_value", "invocations": [ "assertNull...
{ "fields": [ { "declarator": "DEFALT_TIMEOUT = 2 * 1000 * 60", "modifier": "public static final", "original_string": "public static final long DEFALT_TIMEOUT = 2 * 1000 * 60;", "type": "long", "var_name": "DEFALT_TIMEOUT" }, { "declarator": "timeService", "modifi...
{ "body": "public V get(K key) {\n TimedKeyValue<K, V> v = map.get(key);\n if (v != null) {\n //optimized for fast retrieval\n removeExpired(v);\n return v.getValue();\n }\n //we got a miss. maybe others expired\n //hijack the caller thread for this ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_148
{ "fields": [ { "declarator": "commonLoginPolicy", "modifier": "private", "original_string": "private CommonLoginPolicy commonLoginPolicy;", "type": "CommonLoginPolicy", "var_name": "commonLoginPolicy" }, { "declarator": "lockoutPolicyRetriever", "modifier": "priv...
{ "body": "@Test\n public void isAllowed_whenLockoutAfterFailuresIsPositive_returnsTrueIfNotTooManyUnsuccessfulRecentAttempts() {\n when(lockoutPolicyRetriever.getLockoutPolicy()).thenReturn(new LockoutPolicy(2, 2, 300));\n AuditEvent auditEvent = new AuditEvent(failureEventType, null, null, null, 1L...
{ "fields": [ { "declarator": "auditService", "modifier": "private final", "original_string": "private final UaaAuditService auditService;", "type": "UaaAuditService", "var_name": "auditService" }, { "declarator": "lockoutPolicyRetriever", "modifier": "private fin...
{ "body": "@Override\n public Result isAllowed(String principalId) {\n int failureCount = 0;\n if (enabled) {\n LockoutPolicy lockoutPolicy = lockoutPolicyRetriever.getLockoutPolicy();\n\n long eventsAfter = timeService.getCurrentTimeMillis() - lockoutPolicy.getCountFailuresWith...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_373
{ "fields": [ { "declarator": "TEST_USER_ID = \"test-user-id\"", "modifier": "private static final", "original_string": "private static final String TEST_USER_ID = \"test-user-id\";", "type": "String", "var_name": "TEST_USER_ID" }, { "declarator": "TEST_CLIENT_ID = \"te...
{ "body": "@Test\n void delete() {\n jdbcRevocableTokenProvisioning.create(revocableToken, IdentityZoneHolder.get().getId());\n jdbcRevocableTokenProvisioning.retrieve(revocableToken.getTokenId(), IdentityZoneHolder.get().getId());\n jdbcRevocableTokenProvisioning.delete(revocableToken.getToke...
{ "fields": [ { "declarator": "REFRESH_TOKEN_RESPONSE_TYPE = REFRESH_TOKEN.toString()", "modifier": "private final static", "original_string": "private final static String REFRESH_TOKEN_RESPONSE_TYPE = REFRESH_TOKEN.toString();", "type": "String", "var_name": "REFRESH_TOKEN_RESPONSE_...
{ "body": "@Override\n public RevocableToken delete(String id, int version, String zoneId) {\n RevocableToken previous = retrieve(id, false, zoneId);\n template.update(DELETE_QUERY, id, zoneId);\n return previous;\n }", "class_method_signature": "JdbcRevocableTokenProvisioning.delete(Stri...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_61
{ "fields": [ { "declarator": "top", "modifier": "private", "original_string": "private Map<String, Object> top;", "type": "Map<String, Object>", "var_name": "top" }, { "declarator": "secondA", "modifier": "private", "original_string": "private Map<String, O...
{ "body": "@Test\n public void print_sorted_yaml() {\n String expected = \"---\\n\" +\n \"secondA:\\n\" +\n \" thirdA:\\n\" +\n \" keyA: valueA\\n\" +\n \" thirdB:\\n\" +\n \" keyB: valueB\\n\" +\n \"secondB:\\n\" +\n \" t...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/util/UaaMapUtils.java", "identifier": "UaaMapUtils", "interfaces": "", "methods": [ { "class_method_signature": "UaaMapUtils.flatten(Map<String, Object> map)", "constructor": false, "full_signature": "public stat...
{ "body": "public static <K extends Comparable<? super K>, V> String prettyPrintYaml(Map<K,V> map) {\n DumperOptions dump = new DumperOptions();\n dump.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);\n dump.setPrettyFlow(true);\n dump.setIndent(2);\n dump.setCanonical(false);\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_236
{ "fields": [ { "declarator": "notUaaZoneId", "modifier": "private", "original_string": "private String notUaaZoneId;", "type": "String", "var_name": "notUaaZoneId" }, { "declarator": "zoneAwareIdpMetadataGenerator", "modifier": "private", "original_string":...
{ "body": "@Test\n void testWantRequestSigned() {\n zoneAwareIdpMetadataGenerator.setWantAuthnRequestSigned(false);\n assertFalse(zoneAwareIdpMetadataGenerator.isWantAuthnRequestSigned());\n\n zoneAwareIdpMetadataGenerator.setWantAuthnRequestSigned(true);\n assertTrue(zoneAwareIdpMetada...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/idp/ZoneAwareIdpMetadataGenerator.java", "identifier": "ZoneAwareIdpMetadataGenerator", "interfaces": "", "methods": [ { "class_method_signature": "ZoneAwareIdpMetadataGenerator.isAssertionsSigned()", "co...
{ "body": "@Override\n public boolean isWantAuthnRequestSigned() {\n if (!IdentityZoneHolder.isUaa()) {\n return getZoneDefinition().getSamlConfig().isWantAuthnRequestSigned();\n }\n return super.isWantAuthnRequestSigned();\n }", "class_method_signature": "ZoneAwareIdpMetadataG...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_308
{ "fields": [ { "declarator": "factory", "modifier": "private", "original_string": "private CurrentUserCookieFactory factory;", "type": "CurrentUserCookieFactory", "var_name": "factory" }, { "declarator": "sessionTimeout", "modifier": "private", "original_st...
{ "body": "@Test\n void getCookie_setsContextPath() throws Exception {\n Cookie cookie = factory.getCookie(uaaPrincipal);\n assertEquals(\"/\", cookie.getPath());\n }", "class_method_signature": "CurrentUserCookieFactoryTest.getCookie_setsContextPath()", "constructor": false, "full_signature...
{ "fields": [ { "declarator": "CURRENT_USER_COOKIE_NAME = \"Current-User\"", "modifier": "public", "original_string": "public String CURRENT_USER_COOKIE_NAME = \"Current-User\";", "type": "String", "var_name": "CURRENT_USER_COOKIE_NAME" }, { "declarator": "secure", ...
{ "body": "public Cookie getCookie(UaaPrincipal uaaPrincipal) throws CurrentUserCookieEncodingException {\n CurrentUserInformation currentUserInformation = new CurrentUserInformation();\n currentUserInformation.setUserId(uaaPrincipal.getId());\n Cookie cookie = new Cookie(CURRENT_USER_COOKIE_NAME...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_471
{ "fields": [ { "declarator": "provisioner", "modifier": "private", "original_string": "private UserGoogleMfaCredentialsProvisioning provisioner;", "type": "UserGoogleMfaCredentialsProvisioning", "var_name": "provisioner" }, { "declarator": "jdbcProvisioner", "mod...
{ "body": "@Test\n void testGetSecretKey() {\n assertThrows(UnsupportedOperationException.class, () -> provisioner.getSecretKey(\"jabbahut\"));\n }", "class_method_signature": "UserGoogleMfaCredentialsProvisioningTest.testGetSecretKey()", "constructor": false, "full_signature": "@Test void testGetS...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(UserGoogleMfaCredentialsProvisioning.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(UserGoogleMfaCredentialsProvisioning.class);", "type": "Logger", "var...
{ "body": "@Override\n public String getSecretKey(String userId) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "UserGoogleMfaCredentialsProvisioning.getSecretKey(String userId)", "constructor": false, "full_signature": "@Override public String getSecretKey(String us...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_164
{ "fields": [ { "declarator": "auth = SystemAuthentication.SYSTEM_AUTHENTICATION", "modifier": "private", "original_string": "private SystemAuthentication auth = SystemAuthentication.SYSTEM_AUTHENTICATION;", "type": "SystemAuthentication", "var_name": "auth" } ], "file": "ser...
{ "body": "@Test\n public void getName() {\n assertEquals(PRINCIPAL, auth.getName());\n }", "class_method_signature": "SystemAuthenticationTest.getName()", "constructor": false, "full_signature": "@Test public void getName()", "identifier": "getName", "invocations": [ "assertEquals", "g...
{ "fields": [ { "declarator": "SYSTEM_AUTHENTICATION = new SystemAuthentication()", "modifier": "public static final", "original_string": "public static final SystemAuthentication SYSTEM_AUTHENTICATION = new SystemAuthentication();", "type": "SystemAuthentication", "var_name": "SYSTE...
{ "body": "@Override\n public String getName() {\n return PRINCIPAL;\n }", "class_method_signature": "SystemAuthentication.getName()", "constructor": false, "full_signature": "@Override public String getName()", "identifier": "getName", "invocations": [], "modifiers": "@Override public", "p...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_426
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/zone/BannerValidatorTest.java", "identifier": "BannerValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void validatesUrls() throws InvalidIdentityZoneConfigurationException {\n String[] validUrls = {\n \"https://example.com\",\n \"https://example.com/\",\n \"http://example.com/\",\n \"ftp://example.com/\",\n \"https://example.co...
{ "fields": [ { "declarator": "hexColorPattern = Pattern.compile(\"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$\")", "modifier": "private static", "original_string": "private static Pattern hexColorPattern = Pattern.compile(\"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$\");", "type": "Pattern", "var_nam...
{ "body": "public static void validate(Banner banner) throws InvalidIdentityZoneConfigurationException {\n if (banner != null){\n if (StringUtils.hasText(banner.getLink())) {\n if (!UaaUrlUtils.isUrl(banner.getLink())) {\n throw new InvalidIdentityZoneConfigurationE...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_133
{ "fields": [ { "declarator": "instance", "modifier": "private", "original_string": "private PasswordGrantAuthenticationManager instance;", "type": "PasswordGrantAuthenticationManager", "var_name": "instance" }, { "declarator": "zoneAwareAuthzAuthenticationManager", ...
{ "body": "@Test\n void testPasswordGrant_NoLoginHintWithDefaultUaa() {\n Authentication auth = mock(Authentication.class);\n when(zoneAwareAuthzAuthenticationManager.extractLoginHint(auth)).thenReturn(null);\n Map<String, Object> additionalInformation = new HashMap<>();\n additionalInf...
{ "fields": [ { "declarator": "zoneAwareAuthzAuthenticationManager", "modifier": "private", "original_string": "private DynamicZoneAwareAuthenticationManager zoneAwareAuthzAuthenticationManager;", "type": "DynamicZoneAwareAuthenticationManager", "var_name": "zoneAwareAuthzAuthenticat...
{ "body": "@Override\n public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n UaaLoginHint uaaLoginHint = zoneAwareAuthzAuthenticationManager.extractLoginHint(authentication);\n List<String> allowedProviders = getAllowedProviders();\n String defaul...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_349
{ "fields": [ { "declarator": "oAuth2RequestFactory", "modifier": "private", "original_string": "private OAuth2RequestFactory oAuth2RequestFactory;", "type": "OAuth2RequestFactory", "var_name": "oAuth2RequestFactory" }, { "declarator": "uaaAuthorizationEndpoint", ...
{ "body": "@Test\n public void testBuildRedirectURI_doesNotIncludeSessionStateWhenNotPromptNone() {\n AuthorizationRequest authorizationRequest = new AuthorizationRequest();\n authorizationRequest.setRedirectUri(\"http://example.com/somepath\");\n authorizationRequest.setResponseTypes(new Hash...
{ "fields": [ { "declarator": "AUTHORIZATION_REQUEST = \"authorizationRequest\"", "modifier": "public static final", "original_string": "public static final String AUTHORIZATION_REQUEST = \"authorizationRequest\";", "type": "String", "var_name": "AUTHORIZATION_REQUEST" }, { ...
{ "body": "public String buildRedirectURI(AuthorizationRequest authorizationRequest,\n OAuth2AccessToken accessToken,\n Authentication authUser) {\n\n String requestedRedirect = authorizationRequest.getRedirectUri();\n if (accessToken =...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_430
{ "fields": [ { "declarator": "identityZoneManager", "modifier": "private", "original_string": "private IdentityZoneManager identityZoneManager;", "type": "IdentityZoneManager", "var_name": "identityZoneManager" }, { "declarator": "mockIdentityZone", "modifier": "...
{ "body": "@Test\n void getCurrentIdentityZoneId() {\n String zoneId = UUID.randomUUID().toString();\n when(mockIdentityZone.getId()).thenReturn(zoneId);\n\n assertThat(identityZoneManager.getCurrentIdentityZoneId(), is(zoneId));\n }", "class_method_signature": "IdentityZoneManagerImplTes...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/zone/beans/IdentityZoneManagerImpl.java", "identifier": "IdentityZoneManagerImpl", "interfaces": "implements IdentityZoneManager", "methods": [ { "class_method_signature": "IdentityZoneManagerImpl.getCurrentIdentityZone()", ...
{ "body": "@Override\n public String getCurrentIdentityZoneId() {\n return IdentityZoneHolder.getCurrentZoneId();\n }", "class_method_signature": "IdentityZoneManagerImpl.getCurrentIdentityZoneId()", "constructor": false, "full_signature": "@Override public String getCurrentIdentityZoneId()", "id...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_125
{ "fields": [ { "declarator": "instance", "modifier": "private", "original_string": "private PasswordGrantAuthenticationManager instance;", "type": "PasswordGrantAuthenticationManager", "var_name": "instance" }, { "declarator": "zoneAwareAuthzAuthenticationManager", ...
{ "body": "@Test\n void testOIDCPasswordGrantNoUserCredentials() {\n UaaLoginHint loginHint = mock(UaaLoginHint.class);\n when(loginHint.getOrigin()).thenReturn(\"oidcprovider\");\n Authentication auth = mock(Authentication.class);\n when(zoneAwareAuthzAuthenticationManager.extractLogin...
{ "fields": [ { "declarator": "zoneAwareAuthzAuthenticationManager", "modifier": "private", "original_string": "private DynamicZoneAwareAuthenticationManager zoneAwareAuthzAuthenticationManager;", "type": "DynamicZoneAwareAuthenticationManager", "var_name": "zoneAwareAuthzAuthenticat...
{ "body": "@Override\n public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n UaaLoginHint uaaLoginHint = zoneAwareAuthzAuthenticationManager.extractLoginHint(authentication);\n List<String> allowedProviders = getAllowedProviders();\n String defaul...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_467
{ "fields": [ { "declarator": "validator", "modifier": "", "original_string": "GeneralMfaProviderValidator validator;", "type": "GeneralMfaProviderValidator", "var_name": "validator" }, { "declarator": "expectedException = ExpectedException.none()", "modifier": "@...
{ "body": "@Test\n public void validateProviderInvalidNameSpecialChars() {\n expectedException.expect(InvalidMfaProviderException.class);\n expectedException.expectMessage(\"Provider name must be alphanumeric\");\n MfaProvider provider = createValidGoogleMfaProvider()\n .setName...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/mfa/GeneralMfaProviderValidator.java", "identifier": "GeneralMfaProviderValidator", "interfaces": "implements MfaProviderValidator", "methods": [ { "class_method_signature": "GeneralMfaProviderValidator.validate(MfaProvider ...
{ "body": "@Override\n public void validate(MfaProvider mfaProvider) {\n if(mfaProvider.getName() == null || StringUtils.isEmpty(mfaProvider.getName().trim())) {\n throw new InvalidMfaProviderException(\"Provider name is required\");\n }\n mfaProvider.setName(mfaProvider.getName().t...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_172
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/authentication/UaaAuthenticationDetailsTest.java", "identifier": "UaaAuthenticationDetailsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void testNoLoginHint() {\n HttpServletRequest request = mock(HttpServletRequest.class);\n when(request.getParameter(\"login_hint\")).thenReturn(null);\n\n UaaAuthenticationDetails details = new UaaAuthenticationDetails(request, null);\n assertNull(details.getLoginHint...
{ "fields": [ { "declarator": "ADD_NEW = \"add_new\"", "modifier": "public static final", "original_string": "public static final String ADD_NEW = \"add_new\";", "type": "String", "var_name": "ADD_NEW" }, { "declarator": "UNKNOWN = new UaaAuthenticationDetails()", ...
{ "body": "public UaaLoginHint getLoginHint() {\n return loginHint;\n }", "class_method_signature": "UaaAuthenticationDetails.getLoginHint()", "constructor": false, "full_signature": "public UaaLoginHint getLoginHint()", "identifier": "getLoginHint", "invocations": [], "modifiers": "public", "...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_488
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private JdbcUserGoogleMfaCredentialsProvisioning db;", "type": "JdbcUserGoogleMfaCredentialsProvisioning", "var_name": "db" }, { "declarator": "activeKeyLabel", "modifier": "private", ...
{ "body": "@Test\n void save_whenExistsForUser() {\n assertEquals(0, jdbcTemplate.queryForList(\"SELECT * FROM user_google_mfa_credentials\").size());\n UserGoogleMfaCredentials userGoogleMfaCredentials = new UserGoogleMfaCredentials(\"jabbahut\",\n \"very_sercret_key\",\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JdbcUserGoogleMfaCredentialsProvisioning.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(JdbcUserGoogleMfaCredentialsProvisioning.class);", "type": "Logger", ...
{ "body": "@Override\n public void save(UserGoogleMfaCredentials credentials, String zoneId) {\n try {\n jdbcTemplate.update(CREATE_USER_MFA_CONFIG_SQL, ps -> {\n int pos = 1;\n ps.setString(pos++, credentials.getUserId());\n try {\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_223
{ "fields": [ { "declarator": "uaaIdentityProviderDef", "modifier": "", "original_string": "UaaIdentityProviderDefinition uaaIdentityProviderDef;", "type": "UaaIdentityProviderDefinition", "var_name": "uaaIdentityProviderDef" }, { "declarator": "configValidator", ...
{ "body": "@Test\n public void nullPasswordPolicy_isAllowed() {\n uaaIdentityProviderDef.setPasswordPolicy(null);\n configValidator.validate(uaaIdentityProviderDef);\n }", "class_method_signature": "UaaIdentityProviderConfigValidatorTest.nullPasswordPolicy_isAllowed()", "constructor": false, ...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/provider/uaa/UaaIdentityProviderConfigValidator.java", "identifier": "UaaIdentityProviderConfigValidator", "interfaces": "", "methods": [ { "class_method_signature": "UaaIdentityProviderConfigValidator.validate(AbstractIdent...
{ "body": "@Override\n public void validate(AbstractIdentityProviderDefinition definition) {\n if (definition == null) {\n return;\n }\n UaaIdentityProviderDefinition def = (UaaIdentityProviderDefinition) definition;\n\n PasswordPolicy passwordPolicy = def.getPasswordPolicy()...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_389
{ "fields": [ { "declarator": "sampleRsaPrivateKey = \"-----BEGIN RSA PRIVATE KEY-----\\n\" +\n \"MIICXgIBAAKBgQDfTLadf6QgJeS2XXImEHMsa+1O7MmIt44xaL77N2K+J/JGpfV3\\n\" +\n \"AnkyB06wFZ02sBLB7hko42LIsVEOyTuUBird/3vlyHFKytG7UEt60Fl88SbAEfsU\\n\" +\n \"JN1i1aSUlunPS/NCz+BKwwKFP9Ss3rNImE9Uc2LMvGy...
{ "body": "@Test\n public void whenProvidingSecret_ShouldBuildRsaKey() {\n KeyInfo keyInfo = KeyInfoBuilder.build(\"key-id\", sampleRsaPrivateKey, \"https://localhost\");\n\n assertThat(keyInfo.type(), is(\"RSA\"));\n }", "class_method_signature": "KeyInfoBuilderTest.whenProvidingSecret_ShouldBu...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/oauth/KeyInfoBuilder.java", "identifier": "KeyInfoBuilder", "interfaces": "", "methods": [ { "class_method_signature": "KeyInfoBuilder.build(String keyId, String signingKey, String uaaUrl)", "constructor": false, ...
{ "body": "public static KeyInfo build(String keyId, String signingKey, String uaaUrl) {\n if (StringUtils.isEmpty(signingKey)) {\n throw new IllegalArgumentException(\"Signing key cannot be empty\");\n }\n\n Assert.hasText(signingKey, \"[Assertion failed] - this String argument must h...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_74
{ "fields": [ { "declarator": "invalidWildCardUrls = Arrays.asList(\n \"*\",\n \"**\",\n \"*/**\",\n \"**/*\",\n \"*/*\",\n \"**/**\")", "modifier": "private", "original_string": "private List<String> invalidWildCardUrls = Arrays....
{ "body": "@Test\n void getUaaUrlWithZoneAndPath() {\n IdentityZone zone = MultitenancyFixture.identityZone(\"zone1\", \"zone1\");\n\n MockHttpServletRequest request = new MockHttpServletRequest();\n request.setScheme(\"http\");\n request.setServerName(\"zone1.localhost\");\n\n S...
{ "fields": [ { "declarator": "VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\")", "modifier": "private static final", "original_string": "private static final Pattern VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-...
{ "body": "public static String getUaaUrl(String path, IdentityZone currentIdentityZone) {\n return getUaaUrl(path, false, currentIdentityZone);\n }", "class_method_signature": "UaaUrlUtils.getUaaUrl(String path, IdentityZone currentIdentityZone)", "constructor": false, "full_signature": "public stati...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_366
{ "fields": [ { "declarator": "TEST_USER_ID = \"test-user-id\"", "modifier": "private static final", "original_string": "private static final String TEST_USER_ID = \"test-user-id\";", "type": "String", "var_name": "TEST_USER_ID" }, { "declarator": "TEST_CLIENT_ID = \"te...
{ "body": "@Test\n void retrieveAllReturnsNothing() {\n assertNull(jdbcRevocableTokenProvisioning.retrieveAll(IdentityZoneHolder.get().getId()));\n }", "class_method_signature": "JdbcRevocableTokenProvisioningTest.retrieveAllReturnsNothing()", "constructor": false, "full_signature": "@Test void ret...
{ "fields": [ { "declarator": "REFRESH_TOKEN_RESPONSE_TYPE = REFRESH_TOKEN.toString()", "modifier": "private final static", "original_string": "private final static String REFRESH_TOKEN_RESPONSE_TYPE = REFRESH_TOKEN.toString();", "type": "String", "var_name": "REFRESH_TOKEN_RESPONSE_...
{ "body": "@Override\n public List<RevocableToken> retrieveAll(String zoneId) {\n return null;\n }", "class_method_signature": "JdbcRevocableTokenProvisioning.retrieveAll(String zoneId)", "constructor": false, "full_signature": "@Override public List<RevocableToken> retrieveAll(String zoneId)", "...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_23
{ "fields": [ { "declarator": "server", "modifier": "private", "original_string": "private MBeanServerConnection server;", "type": "MBeanServerConnection", "var_name": "server" }, { "declarator": "statsDClient", "modifier": "private", "original_string": "pri...
{ "body": "@Test\n void vm_vitals() {\n uaaMetricsEmitter.emitVmVitals();\n Mockito.verify(statsDClient).gauge(eq(\"vitals.vm.cpu.count\"), gt(0L));\n Mockito.verify(statsDClient).gauge(eq(\"vitals.vm.cpu.load\"), geq(0L));\n Mockito.verify(statsDClient).gauge(eq(\"vitals.vm.memory.tota...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(UaaMetricsEmitter.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(UaaMetricsEmitter.class);", "type": "Logger", "var_name": "logger" }, { "d...
{ "body": "@Scheduled(fixedRate = 5000, initialDelay = 2000)\n public void emitVmVitals() {\n OperatingSystemMXBean mbean = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();\n String prefix = \"vitals.vm.\";\n statsDClient.gauge(prefix + \"cpu.count\", mbean.getAvailablePro...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_274
{ "fields": [ { "declarator": "definition", "modifier": "private", "original_string": "private AbstractExternalOAuthIdentityProviderDefinition definition;", "type": "AbstractExternalOAuthIdentityProviderDefinition", "var_name": "definition" }, { "declarator": "validator...
{ "body": "@Test\n public void configWithShowLinkTextFalse_doesNotNeedLinkText() {\n definition.setShowLinkText(false);\n definition.setLinkText(null);\n validator = new ExternalOAuthIdentityProviderConfigValidator();\n validator.validate(definition);\n }", "class_method_signature"...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/provider/oauth/ExternalOAuthIdentityProviderConfigValidator.java", "identifier": "ExternalOAuthIdentityProviderConfigValidator", "interfaces": "", "methods": [ { "class_method_signature": "ExternalOAuthIdentityProviderConfig...
{ "body": "@Override\n public void validate(AbstractIdentityProviderDefinition definition) {\n if (definition == null) {\n throw new IllegalArgumentException(\"Config cannot be null OAUTH2.0/OIDC1.0 provider\");\n }\n if (!(definition instanceof AbstractExternalOAuthIdentityProvider...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_331
{ "fields": [ { "declarator": "base64EncodedImg = getResourceAsString(\n JdbcClientMetadataProvisioningTest.class,\n \"base64EncodedImg\")", "modifier": "private static final", "original_string": "private static final String base64EncodedImg = getResourceAsString(\n ...
{ "body": "@Test\n void retrieveAll() {\n String clientId1 = randomValueStringGenerator.generate();\n String clientId2 = randomValueStringGenerator.generate();\n String clientId3 = randomValueStringGenerator.generate();\n jdbcTemplate.execute(insertIntoOauthClientDetailsWithMetadata(cli...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JdbcClientMetadataProvisioning.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(JdbcClientMetadataProvisioning.class);", "type": "Logger", "var...
{ "body": "@Override\n public List<ClientMetadata> retrieveAll(String zoneId) {\n logger.debug(\"Retrieving UI details for all client\");\n return jdbcTemplate.query(CLIENT_METADATAS_QUERY, mapper, zoneId);\n }", "class_method_signature": "JdbcClientMetadataProvisioning.retrieveAll(String zoneId...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_448
{ "fields": [ { "declarator": "exceptionReportHttpMessageConverter", "modifier": "private", "original_string": "private ExceptionReportHttpMessageConverter exceptionReportHttpMessageConverter;", "type": "ExceptionReportHttpMessageConverter", "var_name": "exceptionReportHttpMessageCon...
{ "body": "@Test\n public void testWriteInternal() throws Exception {\n ExceptionReport report = new ExceptionReport(new Exception(\"oh noes!\"));\n\n exceptionReportHttpMessageConverter.writeInternal(report, httpOutputMessage);\n\n Map<String, String> expectedFields = new HashMap<>();\n ...
{ "fields": [ { "declarator": "DEFAULT_MESSAGE_CONVERTERS = new RestTemplate()\n .getMessageConverters().toArray(\n new HttpMessageConverter<?>[0])", "modifier": "private static final", "original_string": "private static final HttpMessageConv...
{ "body": "@Override\n protected void writeInternal(ExceptionReport report, HttpOutputMessage outputMessage) throws IOException,\n HttpMessageNotWritableException {\n Exception e = report.getException();\n Map<String, Object> map = new HashMap<>();\n map.put(\"error\", UaaSt...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_262
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/provider/saml/LoginSAMLAuthenticationFailureHandlerTest.java", "identifier": "LoginSAMLAuthenticationFailureHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNoRedirectURI() throws IOException, ServletException {\n LoginSAMLAuthenticationFailureHandler handler = new LoginSAMLAuthenticationFailureHandler();\n\n DefaultSavedRequest savedRequest = mock(DefaultSavedRequest.class);\n Map<String, String[]> parameterMap ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(LoginSAMLAuthenticationFailureHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(LoginSAMLAuthenticationFailureHandler.class);", "type": "Logger", ...
{ "body": "@Override\n public void onAuthenticationFailure(final HttpServletRequest request, final HttpServletResponse response,\n final AuthenticationException exception) throws IOException, ServletException {\n\n String redirectTo = null;\n\n if (exception instanceof LoginSAMLException) ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_35
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/util/ColorHashTest.java", "identifier": "ColorHashTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getColorResultIsConsistent() {\n String input1 = \"cat\";\n String input2 = \"dog\";\n\n assertEquals(getColor(input1), getColor(input1));\n assertEquals(getColor(input2), getColor(input2));\n\n assertNotEquals(getColor(input1), getColor(input2));\n...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/util/ColorHash.java", "identifier": "ColorHash", "interfaces": "", "methods": [ { "class_method_signature": "ColorHash.ColorHash()", "constructor": true, "full_signature": "private ColorHash()", "identifie...
{ "body": "public static Color getColor(String input) {\n int hashCode = input.hashCode();\n if(hashCode < 0) { hashCode *= -1; }\n int r = 20 + 8 * (int) ((1999L * (long) hashCode) % 26);\n int g = 20 + 8 * (int) ((1997L * (long) hashCode) % 26);\n int b = 20 + 8 * (int) ((2003L *...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_327
{ "fields": [ { "declarator": "base64EncodedImg = getResourceAsString(\n JdbcClientMetadataProvisioningTest.class,\n \"base64EncodedImg\")", "modifier": "private static final", "original_string": "private static final String base64EncodedImg = getResourceAsString(\n ...
{ "body": "@Test\n void constraintViolation_WhenNoMatchingClientFound() throws Exception {\n ClientMetadata clientMetadata = createTestClientMetadata(\n randomValueStringGenerator.generate(),\n true,\n new URL(\"http://app.launch/url\"),\n base64En...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JdbcClientMetadataProvisioning.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(JdbcClientMetadataProvisioning.class);", "type": "Logger", "var...
{ "body": "@Override\n public ClientMetadata update(ClientMetadata resource, String zoneId) {\n logger.debug(\"Updating metadata for client: \" + resource.getClientId());\n\n updateClientNameIfNotEmpty(resource, zoneId);\n int updated = jdbcTemplate.update(CLIENT_METADATA_UPDATE, ps -> {\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_62
{ "fields": [ { "declarator": "mockHttpSession", "modifier": "private", "original_string": "private MockHttpSession mockHttpSession;", "type": "MockHttpSession", "var_name": "mockHttpSession" } ], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/util/SessionUtilsTe...
{ "body": "@Test\n void isPasswordChangeRequiredIfNull() {\n assertFalse(SessionUtils.isPasswordChangeRequired(mockHttpSession));\n }", "class_method_signature": "SessionUtilsTest.isPasswordChangeRequiredIfNull()", "constructor": false, "full_signature": "@Test void isPasswordChangeRequiredIfNull()...
{ "fields": [ { "declarator": "PASSWORD_CHANGE_REQUIRED = \"PASSWORD_CHANGE_REQUIRED\"", "modifier": "public static final", "original_string": "public static final String PASSWORD_CHANGE_REQUIRED = \"PASSWORD_CHANGE_REQUIRED\";", "type": "String", "var_name": "PASSWORD_CHANGE_REQUIRE...
{ "body": "public static boolean isPasswordChangeRequired(HttpSession session) {\n Object passwordChangeRequired = session.getAttribute(PASSWORD_CHANGE_REQUIRED);\n\n if (passwordChangeRequired == null) {\n return false;\n }\n\n if (!(passwordChangeRequired instanceof Boolean)) ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_235
{ "fields": [ { "declarator": "notUaaZoneId", "modifier": "private", "original_string": "private String notUaaZoneId;", "type": "String", "var_name": "notUaaZoneId" }, { "declarator": "zoneAwareIdpMetadataGenerator", "modifier": "private", "original_string":...
{ "body": "@Test\n void removeKey() throws Exception {\n changeActiveKey();\n notUaaZoneConfiguration.getSamlConfig().removeKey(\"key-1\");\n IdentityZoneHolder.set(notUaaZone);\n String metadata = SAMLUtil.getMetadataAsString(\n mock(MetadataManager.class),\n ...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/idp/ZoneAwareIdpMetadataGenerator.java", "identifier": "ZoneAwareIdpMetadataGenerator", "interfaces": "", "methods": [ { "class_method_signature": "ZoneAwareIdpMetadataGenerator.isAssertionsSigned()", "co...
{ "body": "@Override\n public EntityDescriptor generateMetadata() {\n EntityDescriptor result = super.generateMetadata();\n result.setID(SAMLUtil.getNCNameString(result.getEntityID()));\n return result;\n }", "class_method_signature": "ZoneAwareIdpMetadataGenerator.generateMetadata()", ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_370
{ "fields": [ { "declarator": "TEST_USER_ID = \"test-user-id\"", "modifier": "private static final", "original_string": "private static final String TEST_USER_ID = \"test-user-id\";", "type": "String", "var_name": "TEST_USER_ID" }, { "declarator": "TEST_CLIENT_ID = \"te...
{ "body": "@Test\n void getUserTokens_WithNullClientId() {\n assertThrows(NullPointerException.class,\n () -> jdbcRevocableTokenProvisioning.getUserTokens(\"userid\", null, IdentityZoneHolder.get().getId()));\n }", "class_method_signature": "JdbcRevocableTokenProvisioningTest.getUserToke...
{ "fields": [ { "declarator": "REFRESH_TOKEN_RESPONSE_TYPE = REFRESH_TOKEN.toString()", "modifier": "private final static", "original_string": "private final static String REFRESH_TOKEN_RESPONSE_TYPE = REFRESH_TOKEN.toString();", "type": "String", "var_name": "REFRESH_TOKEN_RESPONSE_...
{ "body": "@Override\n public List<RevocableToken> getUserTokens(String userId, String zoneId) {\n return template.query(GET_BY_USER_QUERY, rowMapper, userId, zoneId);\n }", "class_method_signature": "JdbcRevocableTokenProvisioning.getUserTokens(String userId, String zoneId)", "constructor": false, ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_409
{ "fields": [ { "declarator": "requestedScopesWithoutOpenId", "modifier": "private", "original_string": "private HashSet<String> requestedScopesWithoutOpenId;", "type": "HashSet<String>", "var_name": "requestedScopesWithoutOpenId" }, { "declarator": "requestedScopesWith...
{ "body": "@Test\n public void shouldSend_isTrue_whenClientHasOpenIdScope_andOpenIdScopeIsRequested_andIdTokenResponseType_GrantTypeIsImplicit() {\n assertTrue(idTokenGranter.shouldSendIdToken(user, clientWithOpenId, requestedScopesWithOpenId, GRANT_TYPE_IMPLICIT));\n }", "class_method_signature": "IdT...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(IdTokenGranter.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(IdTokenGranter.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "public boolean shouldSendIdToken(UaaUser user,\n BaseClientDetails clientDetails,\n Set<String> requestedScopes,\n String requestedGrantType\n ) {\n if (null == user || !GRANT_TYPES_THAT_MA...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_19
{ "fields": [ { "declarator": "config", "modifier": "", "original_string": "GoogleMfaProviderConfig config;", "type": "GoogleMfaProviderConfig", "var_name": "config" } ], "file": "model/src/test/java/org/cloudfoundry/identity/uaa/mfa/GoogleMfaProviderConfigTest.java", "iden...
{ "body": "@Test\n public void testDefaultConfig() {\n config = new GoogleMfaProviderConfig();\n assertThat(config.getProviderDescription(), is(nullValue()));\n assertThat(config.getIssuer(), is(nullValue()));\n }", "class_method_signature": "GoogleMfaProviderConfigTest.testDefaultConfig(...
{ "fields": [ { "declarator": "providerDescription", "modifier": "private", "original_string": "private String providerDescription;", "type": "String", "var_name": "providerDescription" } ], "file": "model/src/main/java/org/cloudfoundry/identity/uaa/mfa/GoogleMfaProviderConfi...
{ "body": "public String getProviderDescription() {\n return providerDescription;\n }", "class_method_signature": "GoogleMfaProviderConfig.getProviderDescription()", "constructor": false, "full_signature": "public String getProviderDescription()", "identifier": "getProviderDescription", "invocatio...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_167
{ "fields": [ { "declarator": "mockHttpServletRequest", "modifier": "private", "original_string": "private MockHttpServletRequest mockHttpServletRequest;", "type": "MockHttpServletRequest", "var_name": "mockHttpServletRequest" }, { "declarator": "mockRequestCache", ...
{ "body": "@Test\n void notAuthenticated() throws Exception {\n passwordChangeUiRequiredFilter.doFilterInternal(mockHttpServletRequest, mockHttpServletResponse, mockFilterChain);\n verify(mockFilterChain, times(1)).doFilter(same(mockHttpServletRequest), same(mockHttpServletResponse));\n }", "cla...
{ "fields": [ { "declarator": "MATCH_PATH = \"/force_password_change\"", "modifier": "private final static", "original_string": "private final static String MATCH_PATH = \"/force_password_change\";", "type": "String", "var_name": "MATCH_PATH" }, { "declarator": "IGNORE_...
{ "body": "@Override\n protected void doFilterInternal(\n final @NonNull HttpServletRequest request,\n final @NonNull HttpServletResponse response,\n final @NonNull FilterChain filterChain) throws ServletException, IOException {\n if (isIgnored(request)) {\n //pas...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_472
{ "fields": [ { "declarator": "provisioner", "modifier": "private", "original_string": "private UserGoogleMfaCredentialsProvisioning provisioner;", "type": "UserGoogleMfaCredentialsProvisioning", "var_name": "provisioner" }, { "declarator": "jdbcProvisioner", "mod...
{ "body": "@Test\n void isFirstTimeMFAUser() {\n UaaPrincipal uaaPrincipal = mock(UaaPrincipal.class);\n assertTrue(provisioner.isFirstTimeMFAUser(uaaPrincipal));\n }", "class_method_signature": "UserGoogleMfaCredentialsProvisioningTest.isFirstTimeMFAUser()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(UserGoogleMfaCredentialsProvisioning.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(UserGoogleMfaCredentialsProvisioning.class);", "type": "Logger", "var...
{ "body": "public boolean isFirstTimeMFAUser(UaaPrincipal uaaPrincipal) {\n if (uaaPrincipal == null) throw new RuntimeException(\"User information is not present in session.\");\n return getUserGoogleMfaCredentials(uaaPrincipal.getId()) == null;\n }", "class_method_signature": "UserGoogleMfaCreden...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_188
{ "fields": [ { "declarator": "emailChangeEmailService", "modifier": "private", "original_string": "private EmailChangeEmailService emailChangeEmailService;", "type": "EmailChangeEmailService", "var_name": "emailChangeEmailService" }, { "declarator": "mockScimUserProvis...
{ "body": "@Test\n void beginEmailChangeWithCompanyNameConfigured() {\n\n emailChangeEmailService = new EmailChangeEmailService(\n templateEngine,\n mockEmailService,\n mockScimUserProvisioning,\n mockExpiringCodeStore,\n mockMultite...
{ "fields": [ { "declarator": "CHANGE_EMAIL_REDIRECT_URL = \"change_email_redirect_url\"", "modifier": "static final", "original_string": "static final String CHANGE_EMAIL_REDIRECT_URL = \"change_email_redirect_url\";", "type": "String", "var_name": "CHANGE_EMAIL_REDIRECT_URL" },...
{ "body": "@Override\n public void beginEmailChange(String userId, String email, String newEmail, String clientId, String redirectUri) {\n ScimUser user = scimUserProvisioning.retrieve(userId, identityZoneManager.getCurrentIdentityZoneId());\n List<ScimUser> results = scimUserProvisioning.retrieveByU...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_219
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void invalid_ldap_origin() {\n IdentityProvider<LdapIdentityProviderDefinition> ldap = new IdentityProvider<>();\n ldap.setType(LDAP);\n ldap.setOriginKey(\"other\");\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(String.fo...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/provider/ldap/LdapIdentityProviderConfigValidator.java", "identifier": "LdapIdentityProviderConfigValidator", "interfaces": "", "methods": [ { "class_method_signature": "LdapIdentityProviderConfigValidator.validate(IdentityP...
{ "body": "@Override\n public void validate(IdentityProvider<? extends AbstractIdentityProviderDefinition> provider) {\n super.validate(provider);\n if (!LDAP.equals(provider.getOriginKey())) {\n throw new IllegalArgumentException(String.format(\"LDAP provider originKey must be set to '%s'...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_130
{ "fields": [ { "declarator": "instance", "modifier": "private", "original_string": "private PasswordGrantAuthenticationManager instance;", "type": "PasswordGrantAuthenticationManager", "var_name": "instance" }, { "declarator": "zoneAwareAuthzAuthenticationManager", ...
{ "body": "@Test\n void testUaaPasswordGrant_allowedProvidersOnlyLdap() {\n Authentication auth = mock(Authentication.class);\n when(zoneAwareAuthzAuthenticationManager.extractLoginHint(auth)).thenReturn(null);\n Map<String, Object> additionalInformation = new HashMap<>();\n additionalI...
{ "fields": [ { "declarator": "zoneAwareAuthzAuthenticationManager", "modifier": "private", "original_string": "private DynamicZoneAwareAuthenticationManager zoneAwareAuthzAuthenticationManager;", "type": "DynamicZoneAwareAuthenticationManager", "var_name": "zoneAwareAuthzAuthenticat...
{ "body": "@Override\n public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n UaaLoginHint uaaLoginHint = zoneAwareAuthzAuthenticationManager.extractLoginHint(authentication);\n List<String> allowedProviders = getAllowedProviders();\n String defaul...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_425
{ "fields": [ { "declarator": "loggingAuditService", "modifier": "private", "original_string": "private LoggingAuditService loggingAuditService;", "type": "LoggingAuditService", "var_name": "loggingAuditService" }, { "declarator": "mockLogger", "modifier": "privat...
{ "body": "@Test\n void log_doesNotModifyNonMaliciousInput() {\n AuditEvent auditEvent = new AuditEvent(UserAuthenticationSuccess, \"principalId\", \"origin\", \"data\", 100L, \"safe-zone\", null, null);\n\n loggingAuditService.log(auditEvent, \"not-used\");\n\n ArgumentCaptor<String> stringCa...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(\"UAA.Audit\")", "modifier": "private", "original_string": "private Logger logger = LoggerFactory.getLogger(\"UAA.Audit\");", "type": "Logger", "var_name": "logger" }, { "declarator": "userAuthenticationCou...
{ "body": "@Override\n public void log(AuditEvent auditEvent, String zoneId) {\n updateCounters(auditEvent);\n\n String logMessage = String.format(\"%s ('%s'): principal=%s, origin=[%s], identityZoneId=[%s]\",\n auditEvent.getType().name(),\n auditEvent.getData(),\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_58
{ "fields": [ { "declarator": "HTTP_HOST_PROPERTY = \"http.proxyHost\"", "modifier": "private static final", "original_string": "private static final String HTTP_HOST_PROPERTY = \"http.proxyHost\";", "type": "String", "var_name": "HTTP_HOST_PROPERTY" }, { "declarator": ...
{ "body": "@Test\n public void trustedOnly() {\n RestTemplate restTemplate = new RestTemplate(UaaHttpRequestUtils.createRequestFactory(false, 10_000));\n try {\n restTemplate.getForEntity(httpsUrl, String.class);\n fail(\"We should not reach this step if the above URL is using a...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(UaaHttpRequestUtils.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(UaaHttpRequestUtils.class);", "type": "Logger", "var_name": "logger" } ], "fil...
{ "body": "public static ClientHttpRequestFactory createRequestFactory(boolean skipSslValidation, int timeout) {\n return createRequestFactory(getClientBuilder(skipSslValidation), timeout);\n }", "class_method_signature": "UaaHttpRequestUtils.createRequestFactory(boolean skipSslValidation, int timeout)", ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_126
{ "fields": [ { "declarator": "instance", "modifier": "private", "original_string": "private PasswordGrantAuthenticationManager instance;", "type": "PasswordGrantAuthenticationManager", "var_name": "instance" }, { "declarator": "zoneAwareAuthzAuthenticationManager", ...
{ "body": "@Test\n void testOIDCPasswordGrantNoBody() {\n UaaLoginHint loginHint = mock(UaaLoginHint.class);\n when(loginHint.getOrigin()).thenReturn(\"oidcprovider\");\n Authentication auth = mock(Authentication.class);\n when(auth.getPrincipal()).thenReturn(\"marissa\");\n when...
{ "fields": [ { "declarator": "zoneAwareAuthzAuthenticationManager", "modifier": "private", "original_string": "private DynamicZoneAwareAuthenticationManager zoneAwareAuthzAuthenticationManager;", "type": "DynamicZoneAwareAuthenticationManager", "var_name": "zoneAwareAuthzAuthenticat...
{ "body": "@Override\n public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n UaaLoginHint uaaLoginHint = zoneAwareAuthzAuthenticationManager.extractLoginHint(authentication);\n List<String> allowedProviders = getAllowedProviders();\n String defaul...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_433
{ "fields": [ { "declarator": "mockSamlKeyManagerFactory", "modifier": "private", "original_string": "private SamlKeyManagerFactory mockSamlKeyManagerFactory;", "type": "SamlKeyManagerFactory", "var_name": "mockSamlKeyManagerFactory" } ], "file": "server/src/test/java/org/clo...
{ "body": "@Test\n void getCurrentZoneId() {\n IdentityZone mockIdentityZone = mock(IdentityZone.class);\n String expectedId = UUID.randomUUID().toString();\n when(mockIdentityZone.getId()).thenReturn(expectedId);\n IdentityZoneHolder.set(mockIdentityZone);\n\n assertThat(Identit...
{ "fields": [ { "declarator": "provisioning", "modifier": "private static", "original_string": "private static IdentityZoneProvisioning provisioning;", "type": "IdentityZoneProvisioning", "var_name": "provisioning" }, { "declarator": "samlKeyManagerFactory = new SamlKey...
{ "body": "public static String getCurrentZoneId() {\n return IDENTITY_ZONE_THREAD_LOCAL.get().getId();\n }", "class_method_signature": "IdentityZoneHolder.getCurrentZoneId()", "constructor": false, "full_signature": "public static String getCurrentZoneId()", "identifier": "getCurrentZoneId", "inv...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_258
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/provider/saml/LoginSAMLAuthenticationFailureHandlerTest.java", "identifier": "LoginSAMLAuthenticationFailureHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testErrorRedirectWithExistingQueryParameters() throws IOException, ServletException {\n LoginSAMLAuthenticationFailureHandler handler = new LoginSAMLAuthenticationFailureHandler();\n\n DefaultSavedRequest savedRequest = mock(DefaultSavedRequest.class);\n Map<Stri...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(LoginSAMLAuthenticationFailureHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(LoginSAMLAuthenticationFailureHandler.class);", "type": "Logger", ...
{ "body": "@Override\n public void onAuthenticationFailure(final HttpServletRequest request, final HttpServletResponse response,\n final AuthenticationException exception) throws IOException, ServletException {\n\n String redirectTo = null;\n\n if (exception instanceof LoginSAMLException) ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_171
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/authentication/UaaAuthenticationDetailsTest.java", "identifier": "UaaAuthenticationDetailsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void testBuildWithoutAuthenticationDetails() {\n MockHttpServletRequest request = new MockHttpServletRequest();\n UaaAuthenticationDetails details = new UaaAuthenticationDetails(request);\n assertNull(details.getClientId());\n }", "class_method_signature": "UaaAuthentic...
{ "fields": [ { "declarator": "ADD_NEW = \"add_new\"", "modifier": "public static final", "original_string": "public static final String ADD_NEW = \"add_new\";", "type": "String", "var_name": "ADD_NEW" }, { "declarator": "UNKNOWN = new UaaAuthenticationDetails()", ...
{ "body": "public String getClientId() {\n return clientId;\n }", "class_method_signature": "UaaAuthenticationDetails.getClientId()", "constructor": false, "full_signature": "public String getClientId()", "identifier": "getClientId", "invocations": [], "modifiers": "public", "parameters": "()"...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_464
{ "fields": [ { "declarator": "validator", "modifier": "", "original_string": "GeneralMfaProviderValidator validator;", "type": "GeneralMfaProviderValidator", "var_name": "validator" }, { "declarator": "expectedException = ExpectedException.none()", "modifier": "@...
{ "body": "@Test\n public void validateProviderInvalidName() {\n expectedException.expect(InvalidMfaProviderException.class);\n expectedException.expectMessage(\"Provider name is required\");\n MfaProvider provider = createValidGoogleMfaProvider()\n .setName(\" \");\n val...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/mfa/GeneralMfaProviderValidator.java", "identifier": "GeneralMfaProviderValidator", "interfaces": "implements MfaProviderValidator", "methods": [ { "class_method_signature": "GeneralMfaProviderValidator.validate(MfaProvider ...
{ "body": "@Override\n public void validate(MfaProvider mfaProvider) {\n if(mfaProvider.getName() == null || StringUtils.isEmpty(mfaProvider.getName().trim())) {\n throw new InvalidMfaProviderException(\"Provider name is required\");\n }\n mfaProvider.setName(mfaProvider.getName().t...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_413
{ "fields": [ { "declarator": "requestedScopesWithoutOpenId", "modifier": "private", "original_string": "private HashSet<String> requestedScopesWithoutOpenId;", "type": "HashSet<String>", "var_name": "requestedScopesWithoutOpenId" }, { "declarator": "requestedScopesWith...
{ "body": "@Test\n public void shouldSend_isFalse_whenAuthorizationCodeGrantIsUsed_withCodeResponseType_withUnapprovedOpenId() {\n doThrow(InvalidTokenException.class).when(approvalService).ensureRequiredApprovals(any(), any(), any(), any());\n assertFalse(idTokenGranter.shouldSendIdToken(user, clien...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(IdTokenGranter.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(IdTokenGranter.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "public boolean shouldSendIdToken(UaaUser user,\n BaseClientDetails clientDetails,\n Set<String> requestedScopes,\n String requestedGrantType\n ) {\n if (null == user || !GRANT_TYPES_THAT_MA...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_106
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/util/UaaTokenUtilsTest.java", "identifier": "UaaTokenUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_required_user_groups_valid() {\n List<String> requiredGroups = Arrays.asList(\"scope1\",\"scope2\",\"scope3\");\n List<String> userGroups = Arrays.asList(\"scope1\",\"scope2\",\"scope3\",\"scope4\");\n assertTrue(UaaTokenUtils.hasRequiredUserGroups(requiredG...
{ "fields": [ { "declarator": "jwtPattern = Pattern.compile(\"[a-zA-Z0-9_\\\\-\\\\\\\\=]*\\\\.[a-zA-Z0-9_\\\\-\\\\\\\\=]*\\\\.[a-zA-Z0-9_\\\\-\\\\\\\\=]*\")", "modifier": "public static final", "original_string": "public static final Pattern jwtPattern = Pattern.compile(\"[a-zA-Z0-9_\\\\-\\\\\\\...
{ "body": "public static boolean hasRequiredUserGroups(Collection<String> requiredGroups, Collection<String> userGroups) {\n return ofNullable(userGroups).orElse(emptySet())\n .containsAll(ofNullable(requiredGroups).orElse(emptySet()));\n }", "class_method_signature": "UaaTokenUtils.hasRequired...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_78
{ "fields": [ { "declarator": "invalidWildCardUrls = Arrays.asList(\n \"*\",\n \"**\",\n \"*/**\",\n \"**/*\",\n \"*/*\",\n \"**/**\")", "modifier": "private", "original_string": "private List<String> invalidWildCardUrls = Arrays....
{ "body": "@Test\n void securityProtocol() {\n MockHttpServletRequest request = new MockHttpServletRequest();\n request.setScheme(\"https\");\n request.setServerPort(8443);\n request.setServerName(\"localhost\");\n\n ServletRequestAttributes attrs = new ServletRequestAttributes(r...
{ "fields": [ { "declarator": "VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\")", "modifier": "private static final", "original_string": "private static final Pattern VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-...
{ "body": "public static String getUaaUrl(String path, IdentityZone currentIdentityZone) {\n return getUaaUrl(path, false, currentIdentityZone);\n }", "class_method_signature": "UaaUrlUtils.getUaaUrl(String path, IdentityZone currentIdentityZone)", "constructor": false, "full_signature": "public stati...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_385
{ "fields": [ { "declarator": "introspectEndpoint", "modifier": "private", "original_string": "private IntrospectEndpoint introspectEndpoint;", "type": "IntrospectEndpoint", "var_name": "introspectEndpoint" }, { "declarator": "resourceServerTokenServices", "modifi...
{ "body": "@Test\n void invalidToken_inLoadAuthentication() {\n OAuth2AccessToken token = mock(OAuth2AccessToken.class);\n when(resourceServerTokenServices.readAccessToken(validToken)).thenReturn(token);\n when(resourceServerTokenServices.loadAuthentication(validToken)).thenThrow(new InvalidTo...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(getClass())", "modifier": "protected final", "original_string": "protected final Logger logger = LoggerFactory.getLogger(getClass());", "type": "Logger", "var_name": "logger" }, { "declarator": "resourceSer...
{ "body": "@RequestMapping(value = \"/introspect\", method = POST)\n @ResponseBody\n public IntrospectionClaims introspect(@RequestParam(\"token\") String token) {\n IntrospectionClaims introspectionClaims = new IntrospectionClaims();\n\n try {\n OAuth2AccessToken oAuth2AccessToken = re...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_1
{ "fields": [ { "declarator": "definition", "modifier": "", "original_string": "ExternalIdentityProviderDefinition definition;", "type": "ExternalIdentityProviderDefinition", "var_name": "definition" } ], "file": "model/src/test/java/org/cloudfoundry/identity/uaa/provider/Ext...
{ "body": "@Test\n public void testDefaultValueForStoreCustomAttributes() {\n assertTrue(definition.isStoreCustomAttributes());\n }", "class_method_signature": "ExternalIdentityProviderDefinitionTest.testDefaultValueForStoreCustomAttributes()", "constructor": false, "full_signature": "@Test public ...
{ "fields": [ { "declarator": "GROUP_ATTRIBUTE_NAME = \"external_groups\"", "modifier": "public static final", "original_string": "public static final String GROUP_ATTRIBUTE_NAME = \"external_groups\";", "type": "String", "var_name": "GROUP_ATTRIBUTE_NAME" }, { "declara...
{ "body": "public boolean isStoreCustomAttributes() {\n return storeCustomAttributes;\n }", "class_method_signature": "ExternalIdentityProviderDefinition.isStoreCustomAttributes()", "constructor": false, "full_signature": "public boolean isStoreCustomAttributes()", "identifier": "isStoreCustomAttrib...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_97
{ "fields": [ { "declarator": "invalidWildCardUrls = Arrays.asList(\n \"*\",\n \"**\",\n \"*/**\",\n \"**/*\",\n \"*/*\",\n \"**/**\")", "modifier": "private", "original_string": "private List<String> invalidWildCardUrls = Arrays....
{ "body": "@Test\n void validateValidSubdomains() {\n validSubdomains.forEach(testString -> assertTrue(UaaUrlUtils.isValidSubdomain(testString)));\n }", "class_method_signature": "UaaUrlUtilsTest.validateValidSubdomains()", "constructor": false, "full_signature": "@Test void validateValidSubdomain...
{ "fields": [ { "declarator": "VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\")", "modifier": "private static final", "original_string": "private static final Pattern VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-...
{ "body": "public static boolean isValidSubdomain(String subdomain) {\n return VALID_SUBDOMAIN_PATTERN.matcher(subdomain).matches();\n }", "class_method_signature": "UaaUrlUtils.isValidSubdomain(String subdomain)", "constructor": false, "full_signature": "public static boolean isValidSubdomain(String ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_444
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/web/HeaderFilterTest.java", "identifier": "HeaderFilterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void doFilter() throws Exception {\n FilterChain mockChain = Mockito.mock(FilterChain.class);\n HeaderFilter filter = new HeaderFilter(emptyList());\n MockHttpServletRequest request = new MockHttpServletRequest();\n MockHttpServletResponse response = new MockHt...
{ "fields": [ { "declarator": "filteredHeaderNames", "modifier": "private final", "original_string": "private final List<String> filteredHeaderNames;", "type": "List<String>", "var_name": "filteredHeaderNames" } ], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/w...
{ "body": "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n chain.doFilter(new HttpHeadersFilterRequestWrapper(filteredHeaderNames, (HttpServletRequest) request), response);\n }", "class_method_signature": "He...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_501
{ "fields": [ { "declarator": "metric", "modifier": "private", "original_string": "private QueryMetric metric;", "type": "QueryMetric", "var_name": "metric" } ], "file": "metrics-data/src/test/java/org/cloudfoundry/identity/uaa/metrics/QueryMetricTest.java", "identifier": "...
{ "body": "@Test\n void isSuccess() {\n assertTrue(metric.isIntolerable());\n }", "class_method_signature": "QueryMetricTest.isSuccess()", "constructor": false, "full_signature": "@Test void isSuccess()", "identifier": "isSuccess", "invocations": [ "assertTrue", "isIntolerable" ], "...
{ "fields": [ { "declarator": "query", "modifier": "private", "original_string": "private String query;", "type": "String", "var_name": "query" }, { "declarator": "intolerable", "modifier": "private", "original_string": "private boolean intolerable;", ...
{ "body": "public boolean isIntolerable() {\n return intolerable;\n }", "class_method_signature": "QueryMetric.isIntolerable()", "constructor": false, "full_signature": "public boolean isIntolerable()", "identifier": "isIntolerable", "invocations": [], "modifiers": "public", "parameters": "()"...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_151
{ "fields": [ { "declarator": "applicationEventPublisher", "modifier": "private", "original_string": "private ApplicationEventPublisher applicationEventPublisher;", "type": "ApplicationEventPublisher", "var_name": "applicationEventPublisher" }, { "declarator": "uaaUserD...
{ "body": "@Test(expected = BadCredentialsException.class)\n public void testAuthenticateUserInsertFails() {\n when(uaaUserDatabase.retrieveUserByName(anyString(),anyString())).thenThrow(new UsernameNotFoundException(\"\"));\n manager.authenticate(inputAuth);\n }", "class_method_signature": "Ext...
{ "fields": [ { "declarator": "USER_ATTRIBUTE_PREFIX = \"user.attribute.\"", "modifier": "public static final", "original_string": "public static final String USER_ATTRIBUTE_PREFIX = \"user.attribute.\";", "type": "String", "var_name": "USER_ATTRIBUTE_PREFIX" }, { "decl...
{ "body": "@Override\n public Authentication authenticate(Authentication request) throws AuthenticationException {\n logger.debug(\"Starting external authentication for:\"+request);\n ExternalAuthenticationDetails authenticationData = getExternalAuthenticationDetails(request);\n UaaUser userFr...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_278
{ "fields": [ { "declarator": "mockIdentityProviderProvisioning", "modifier": "@Mock\n private", "original_string": "@Mock\n private IdentityProviderProvisioning mockIdentityProviderProvisioning;", "type": "IdentityProviderProvisioning", "var_name": "mockIdentityProviderProvisi...
{ "body": "@Test\n void remove_client_secret_wrong_origin() {\n IdentityProvider provider = getExternalOAuthProvider();\n AbstractExternalOAuthIdentityProviderDefinition spy = Mockito.spy((AbstractExternalOAuthIdentityProviderDefinition) provider.getConfig());\n provider.setConfig(spy);\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(IdentityProviderEndpoints.class)", "modifier": "protected static", "original_string": "protected static Logger logger = LoggerFactory.getLogger(IdentityProviderEndpoints.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "protected void redactSensitiveData(IdentityProvider provider) {\n if (provider.getConfig() == null) {\n return;\n }\n switch (provider.getType()) {\n case LDAP: {\n if (provider.getConfig() instanceof LdapIdentityProviderDefinition) {\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_297
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/logging/LogSanitizerUtilTest.java", "identifier": "LogSanitizerUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSanitizeCleanInput() {\n assertEquals(LogSanitizerUtil.sanitize(\"one two three four\"),\n \"one two three four\");\n }", "class_method_signature": "LogSanitizerUtilTest.testSanitizeCleanInput()", "constructor": false, "full_signature": "@Test publi...
{ "fields": [ { "declarator": "SANITIZED_FLAG = \"[SANITIZED]\"", "modifier": "public static final", "original_string": "public static final String SANITIZED_FLAG = \"[SANITIZED]\";", "type": "String", "var_name": "SANITIZED_FLAG" } ], "file": "server/src/main/java/org/cloudf...
{ "body": "public static String sanitize(String original) {\n String cleaned = original.replace(\"\\r\",\"|\")\n .replace(\"\\n\",\"|\")\n .replace(\"\\t\",\"|\");\n\n if (!cleaned.equals(original)) {\n cleaned += SANITIZED_FLAG;\n }\n\n return clea...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_452
{ "fields": [ { "declarator": "BAD_HEADERS = Arrays.asList(\"X-Forwarded-For\", \"X-Forwarded-Host\", \"X-Forwarded-Proto\", \"X-Forwarded-Prefix\", \"Forwarded\")", "modifier": "public static", "original_string": "public static List<String> BAD_HEADERS = Arrays.asList(\"X-Forwarded-For\", \"X-F...
{ "body": "@Test\n public void filtered_available_headers() {\n request = new HttpHeadersFilterRequestWrapper(BAD_HEADERS, mock);\n List<String> actual = Collections.list(request.getHeaderNames());\n List<String> wanted = Collections.singletonList(\"Other-header\");\n assertThat(actual,...
{ "fields": [ { "declarator": "filteredHeaders", "modifier": "private final", "original_string": "private final List<String> filteredHeaders;", "type": "List<String>", "var_name": "filteredHeaders" } ], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/web/HttpHeade...
{ "body": "@Override\n public Enumeration<String> getHeaderNames() {\n List<String> headerNames = Collections.list(super.getHeaderNames());\n headerNames.removeIf(header -> shouldFilter(header));\n return Collections.enumeration(headerNames);\n }", "class_method_signature": "HttpHeadersFi...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_147
{ "fields": [ { "declarator": "commonLoginPolicy", "modifier": "private", "original_string": "private CommonLoginPolicy commonLoginPolicy;", "type": "CommonLoginPolicy", "var_name": "commonLoginPolicy" }, { "declarator": "lockoutPolicyRetriever", "modifier": "priv...
{ "body": "@Test\n public void isAllowed_whenLockoutAfterFailuresIsPositive_returnsFalseIfTooManyUnsuccessfulRecentAttempts() {\n when(lockoutPolicyRetriever.getLockoutPolicy()).thenReturn(new LockoutPolicy(2, 1, 300));\n AuditEvent auditEvent = new AuditEvent(failureEventType, null, null, null, 1L, ...
{ "fields": [ { "declarator": "auditService", "modifier": "private final", "original_string": "private final UaaAuditService auditService;", "type": "UaaAuditService", "var_name": "auditService" }, { "declarator": "lockoutPolicyRetriever", "modifier": "private fin...
{ "body": "@Override\n public Result isAllowed(String principalId) {\n int failureCount = 0;\n if (enabled) {\n LockoutPolicy lockoutPolicy = lockoutPolicyRetriever.getLockoutPolicy();\n\n long eventsAfter = timeService.getCurrentTimeMillis() - lockoutPolicy.getCountFailuresWith...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_39
{ "fields": [ { "declarator": "TIMEOUT = 50", "modifier": "public static final", "original_string": "public static final int TIMEOUT = 50;", "type": "int", "var_name": "TIMEOUT" }, { "declarator": "timeService = new MockTimeService()", "modifier": "private", ...
{ "body": "@Test\n public void non_existent_remove() {\n assertNull(map.remove(\"does-not-exist\"));\n }", "class_method_signature": "TimeBasedExpiringValueMapTest.non_existent_remove()", "constructor": false, "full_signature": "@Test public void non_existent_remove()", "identifier": "non_existen...
{ "fields": [ { "declarator": "DEFALT_TIMEOUT = 2 * 1000 * 60", "modifier": "public static final", "original_string": "public static final long DEFALT_TIMEOUT = 2 * 1000 * 60;", "type": "long", "var_name": "DEFALT_TIMEOUT" }, { "declarator": "timeService", "modifi...
{ "body": "public V remove(K key) {\n TimedKeyValue<K, V> v = map.remove(key);\n if (v != null) {\n return v.getValue();\n }\n return null;\n }", "class_method_signature": "TimeBasedExpiringValueMap.remove(K key)", "constructor": false, "full_signature": "public V remov...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_281
{ "fields": [ { "declarator": "mockIdentityProviderProvisioning", "modifier": "@Mock\n private", "original_string": "@Mock\n private IdentityProviderProvisioning mockIdentityProviderProvisioning;", "type": "IdentityProviderProvisioning", "var_name": "mockIdentityProviderProvisi...
{ "body": "@Test\n void patch_client_secret() {\n for (String type : Arrays.asList(OIDC10, OAUTH20)) {\n IdentityProvider<AbstractExternalOAuthIdentityProviderDefinition> provider = getExternalOAuthProvider();\n AbstractExternalOAuthIdentityProviderDefinition def = provider.getConfig()...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(IdentityProviderEndpoints.class)", "modifier": "protected static", "original_string": "protected static Logger logger = LoggerFactory.getLogger(IdentityProviderEndpoints.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "protected void patchSensitiveData(String id, IdentityProvider provider) {\n String zoneId = identityZoneManager.getCurrentIdentityZoneId();\n if (provider.getConfig() == null) {\n return;\n }\n switch (provider.getType()) {\n case LDAP: {\n i...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_405
{ "fields": [ { "declarator": "requestedScopesWithoutOpenId", "modifier": "private", "original_string": "private HashSet<String> requestedScopesWithoutOpenId;", "type": "HashSet<String>", "var_name": "requestedScopesWithoutOpenId" }, { "declarator": "requestedScopesWith...
{ "body": "@Test\n public void shouldSend_isFalse_whenJwtBearerGrantType() {\n assertFalse(idTokenGranter.shouldSendIdToken(user, clientWithOpenId, requestedScopesWithOpenId, GRANT_TYPE_USER_TOKEN));\n }", "class_method_signature": "IdTokenGranterTest.shouldSend_isFalse_whenJwtBearerGrantType()", "co...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(IdTokenGranter.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(IdTokenGranter.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "public boolean shouldSendIdToken(UaaUser user,\n BaseClientDetails clientDetails,\n Set<String> requestedScopes,\n String requestedGrantType\n ) {\n if (null == user || !GRANT_TYPES_THAT_MA...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_110
{ "fields": [ { "declarator": "CLIENT_ID = \"app\"", "modifier": "public static final", "original_string": "public static final String CLIENT_ID = \"app\";", "type": "String", "var_name": "CLIENT_ID" }, { "declarator": "USER_ID = \"a7f07bf6-e720-4652-8999-e980189cef54\"...
{ "body": "@Test\n public void validate_KeyId_isPresent() {\n header = map(entry(\"alg\", \"HS256\"));\n\n expectedException.expectMessage(\"kid claim not found in JWT token header\");\n\n TokenValidation.buildAccessTokenValidator(getToken(), new KeyInfoService(\"https://localhost\"));\n }"...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(TokenValidation.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(TokenValidation.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "public static TokenValidation buildAccessTokenValidator(String tokenJwtValue, KeyInfoService keyInfoService) {\n AccessTokenValidation validator = new AccessTokenValidation(tokenJwtValue, keyInfoService);\n validator.checkSignature();\n return validator;\n }", "class_method_signat...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_239
{ "fields": [ { "declarator": "samlTestUtils", "modifier": "private", "original_string": "private SamlTestUtils samlTestUtils;", "type": "SamlTestUtils", "var_name": "samlTestUtils" }, { "declarator": "samlServiceProviderConfigurator", "modifier": "private", ...
{ "body": "@Test\n void getAvailableProvidersForDefaultAndNonDefaultZone() {\n IdentityZone uaaZone = IdentityZoneHolder.getUaaZone();\n samlTestUtils.setupZoneWithSamlConfig(uaaZone);\n IdentityZone testZone = new IdentityZone();\n testZone.setName(\"non-default-zone\");\n testZ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(NonSnarlIdpMetadataManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(NonSnarlIdpMetadataManager.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n public List<ExtendedMetadataDelegate> getAvailableProviders() {\n IdentityZone zone = IdentityZoneHolder.get();\n List<ExtendedMetadataDelegate> result = new ArrayList<>();\n try {\n result.add(getLocalIdp());\n } catch (MetadataProviderException e) {\n...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_393
{ "fields": [ { "declarator": "issuerUrl", "modifier": "private", "original_string": "private String issuerUrl;", "type": "String", "var_name": "issuerUrl" }, { "declarator": "uaaUrl", "modifier": "private", "original_string": "private String uaaUrl;", ...
{ "body": "@Test\n void create_includesEmailVerified() throws IdTokenCreationException {\n user.setVerified(false);\n IdToken idToken = tokenCreator.create(clientDetails, user, userAuthenticationData);\n assertThat(idToken.emailVerified, is(false));\n }", "class_method_signature": "IdToke...
{ "fields": [ { "declarator": "ROLES_SCOPE = \"roles\"", "modifier": "private final", "original_string": "private final String ROLES_SCOPE = \"roles\";", "type": "String", "var_name": "ROLES_SCOPE" }, { "declarator": "logger = LoggerFactory.getLogger(getClass())", ...
{ "body": "public IdToken create(ClientDetails clientDetails,\n UaaUser uaaUser,\n UserAuthenticationData userAuthenticationData) throws IdTokenCreationException {\n Date expiryDate = tokenValidityResolver.resolve(clientDetails.getClientId());\n Date iss...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_81
{ "fields": [ { "declarator": "invalidWildCardUrls = Arrays.asList(\n \"*\",\n \"**\",\n \"*/**\",\n \"**/*\",\n \"*/*\",\n \"**/**\")", "modifier": "private", "original_string": "private List<String> invalidWildCardUrls = Arrays....
{ "body": "@Test\n void xForwardedPrefixHeaderIsIgnored() {\n MockHttpServletRequest request = new MockHttpServletRequest();\n request.setScheme(\"http\");\n request.setServerName(\"login.localhost\");\n request.addHeader(\"X-Forwarded-Prefix\", \"/prefix\");\n\n ServletRequestAt...
{ "fields": [ { "declarator": "VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\")", "modifier": "private static final", "original_string": "private static final Pattern VALID_SUBDOMAIN_PATTERN = Pattern.compile(\"([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-...
{ "body": "public static String getUaaUrl(String path, IdentityZone currentIdentityZone) {\n return getUaaUrl(path, false, currentIdentityZone);\n }", "class_method_signature": "UaaUrlUtils.getUaaUrl(String path, IdentityZone currentIdentityZone)", "constructor": false, "full_signature": "public stati...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_491
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private JdbcUserGoogleMfaCredentialsProvisioning db;", "type": "JdbcUserGoogleMfaCredentialsProvisioning", "var_name": "db" }, { "declarator": "activeKeyLabel", "modifier": "private", ...
{ "body": "@Test\n void delete() {\n assertEquals(0, jdbcTemplate.queryForList(\"SELECT * FROM user_google_mfa_credentials\").size());\n db.save(new UserGoogleMfaCredentials(\"user1\", \"secret\", 12345, Collections.singletonList(123)).setMfaProviderId(MFA_ID), zoneId);\n assertEquals(1, jdbcT...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JdbcUserGoogleMfaCredentialsProvisioning.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(JdbcUserGoogleMfaCredentialsProvisioning.class);", "type": "Logger", ...
{ "body": "@Override\n public int delete(String userId) {\n return jdbcTemplate.update(DELETE_USER_MFA_CONFIG_SQL, userId);\n }", "class_method_signature": "JdbcUserGoogleMfaCredentialsProvisioning.delete(String userId)", "constructor": false, "full_signature": "@Override public int delete(String u...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_184
{ "fields": [ { "declarator": "mockMvc", "modifier": "private", "original_string": "private MockMvc mockMvc;", "type": "MockMvc", "var_name": "mockMvc" }, { "declarator": "mockScimUserProvisioning", "modifier": "private", "original_string": "private ScimUser...
{ "body": "@Test\n void changingAPasswordWithAValidCode() throws Exception {\n ExpiringCode code = new ExpiringCode(\"secret_code\", new Timestamp(System.currentTimeMillis() + UaaResetPasswordService.PASSWORD_RESET_LIFETIME),\n \"{\\\"user_id\\\":\\\"eyedee\\\",\\\"username\\\":\\\"user@examp...
{ "fields": [ { "declarator": "resetPasswordService", "modifier": "private final", "original_string": "private final ResetPasswordService resetPasswordService;", "type": "ResetPasswordService", "var_name": "resetPasswordService" }, { "declarator": "messageConverters", ...
{ "body": "@RequestMapping(value = \"/password_change\", method = RequestMethod.POST)\n public ResponseEntity<LostPasswordChangeResponse> changePassword(@RequestBody LostPasswordChangeRequest passwordChangeRequest) {\n ResponseEntity<LostPasswordChangeResponse> responseEntity;\n if (passwordChangeReq...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_307
{ "fields": [ { "declarator": "factory", "modifier": "private", "original_string": "private CurrentUserCookieFactory factory;", "type": "CurrentUserCookieFactory", "var_name": "factory" }, { "declarator": "sessionTimeout", "modifier": "private", "original_st...
{ "body": "@Test\n void getCookie_returnsCookieMaxAgeEqualToSessionTimeout() throws Exception {\n Cookie cookie = factory.getCookie(uaaPrincipal);\n assertEquals(sessionTimeout, cookie.getMaxAge());\n }", "class_method_signature": "CurrentUserCookieFactoryTest.getCookie_returnsCookieMaxAgeEqualT...
{ "fields": [ { "declarator": "CURRENT_USER_COOKIE_NAME = \"Current-User\"", "modifier": "public", "original_string": "public String CURRENT_USER_COOKIE_NAME = \"Current-User\";", "type": "String", "var_name": "CURRENT_USER_COOKIE_NAME" }, { "declarator": "secure", ...
{ "body": "public Cookie getCookie(UaaPrincipal uaaPrincipal) throws CurrentUserCookieEncodingException {\n CurrentUserInformation currentUserInformation = new CurrentUserInformation();\n currentUserInformation.setUserId(uaaPrincipal.getId());\n Cookie cookie = new Cookie(CURRENT_USER_COOKIE_NAME...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_242
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private JdbcSamlServiceProviderProvisioning db;", "type": "JdbcSamlServiceProviderProvisioning", "var_name": "db" }, { "declarator": "jdbcTemplate", "modifier": "@Autowired\n private...
{ "body": "@Test\n void createSamlServiceProviderWithSameEntityIdInDefaultZone() {\n String zoneId = IdentityZone.getUaaZoneId();\n SamlServiceProvider sp = createSamlServiceProvider(zoneId);\n db.create(sp, sp.getIdentityZoneId());\n assertThrows(SamlSpAlreadyExistsException.class, () ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(JdbcIdentityProviderProvisioning.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JdbcIdentityProviderProvisioning.class);", "type": "Logger", ...
{ "body": "@Override\n public SamlServiceProvider create(final SamlServiceProvider serviceProvider, final String zoneId) {\n validate(serviceProvider);\n final String id = UUID.randomUUID().toString();\n try {\n jdbcTemplate.update(CREATE_SERVICE_PROVIDER_SQL, ps -> {\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_15
{ "fields": [ { "declarator": "testDateString = \"2017-07-07T23:25:01.297Z\"", "modifier": "", "original_string": "String testDateString = \"2017-07-07T23:25:01.297Z\";", "type": "String", "var_name": "testDateString" }, { "declarator": "exceptionOccured = null", ...
{ "body": "@Test\n public void testParsing() throws IOException, ParseException {\n Date d = JsonDateDeserializer.getDate(testDateString, new JsonLocation(null, 22, 0, 0));\n Assert.assertEquals(new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\").parse(testDateString).getTime(), (long) d.getTime()...
{ "fields": [ { "declarator": "DATE_FORMATTER = \"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\"", "modifier": "public static final", "original_string": "public static final String DATE_FORMATTER = \"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\";", "type": "String", "var_name": "DATE_FORMATTER" } ], "file"...
{ "body": "public static Date getDate(String text, JsonLocation loc) throws IOException {\n try {\n return new SimpleDateFormat(DATE_FORMATTER).parse(text);\n } catch (ParseException e) {\n throw new JsonParseException(\"Could not parse date:\"+ text, loc, e);\n }\n }", ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_429
{ "fields": [ { "declarator": "identityZoneManager", "modifier": "private", "original_string": "private IdentityZoneManager identityZoneManager;", "type": "IdentityZoneManager", "var_name": "identityZoneManager" }, { "declarator": "mockIdentityZone", "modifier": "...
{ "body": "@Test\n void getCurrentIdentityZone() {\n assertThat(identityZoneManager.getCurrentIdentityZone(), is(mockIdentityZone));\n }", "class_method_signature": "IdentityZoneManagerImplTest.getCurrentIdentityZone()", "constructor": false, "full_signature": "@Test void getCurrentIdentityZone()",...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/zone/beans/IdentityZoneManagerImpl.java", "identifier": "IdentityZoneManagerImpl", "interfaces": "implements IdentityZoneManager", "methods": [ { "class_method_signature": "IdentityZoneManagerImpl.getCurrentIdentityZone()", ...
{ "body": "@Override\n public IdentityZone getCurrentIdentityZone() {\n return IdentityZoneHolder.get();\n }", "class_method_signature": "IdentityZoneManagerImpl.getCurrentIdentityZone()", "constructor": false, "full_signature": "@Override public IdentityZone getCurrentIdentityZone()", "identifie...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_350
{ "fields": [ { "declarator": "oAuth2RequestFactory", "modifier": "private", "original_string": "private OAuth2RequestFactory oAuth2RequestFactory;", "type": "OAuth2RequestFactory", "var_name": "oAuth2RequestFactory" }, { "declarator": "uaaAuthorizationEndpoint", ...
{ "body": "@Test\n public void buildRedirectURI_includesSessionStateForPromptEqualsNone() {\n AuthorizationRequest authorizationRequest = new AuthorizationRequest();\n authorizationRequest.setRedirectUri(\"http://example.com/somepath\");\n authorizationRequest.setRequestParameters(new HashMap<...
{ "fields": [ { "declarator": "AUTHORIZATION_REQUEST = \"authorizationRequest\"", "modifier": "public static final", "original_string": "public static final String AUTHORIZATION_REQUEST = \"authorizationRequest\";", "type": "String", "var_name": "AUTHORIZATION_REQUEST" }, { ...
{ "body": "public String buildRedirectURI(AuthorizationRequest authorizationRequest,\n OAuth2AccessToken accessToken,\n Authentication authUser) {\n\n String requestedRedirect = authorizationRequest.getRedirectUri();\n if (accessToken =...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_42
{ "fields": [ { "declarator": "alias = \"saml\"", "modifier": "public static final", "original_string": "public static final String alias = \"saml\";", "type": "String", "var_name": "alias" }, { "declarator": "idpMetaData = \"<?xml version=\\\"1.0\\\"?>\\n\" +\n ...
{ "body": "@Test\n public void test_no_allowed_client_providers() {\n client.addAdditionalInformation(ALLOWED_PROVIDERS, EMPTY_LIST);\n assertThat(filter.filter(activeProviders,client,email), Matchers.containsInAnyOrder());\n }", "class_method_signature": "DomainFilterTest.test_no_allowed_client...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(DomainFilter.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(DomainFilter.class);", "type": "Logger", "var_name": "logger" } ], "file": "server/sr...
{ "body": "public static List<IdentityProvider> filter(List<IdentityProvider> activeProviders, ClientDetails client, String email) {\n return filter(activeProviders, client, email, true);\n }", "class_method_signature": "DomainFilter.filter(List<IdentityProvider> activeProviders, ClientDetails client, Str...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_215
{ "fields": [ { "declarator": "attrs", "modifier": "private", "original_string": "private Attributes attrs;", "type": "Attributes", "var_name": "attrs" }, { "declarator": "adapter", "modifier": "private", "original_string": "private DirContextAdapter adapter...
{ "body": "@Test\n public void testGivenNameAttributeNameMapping() throws Exception {\n attrs.put(\"givenName\", \"Marissa\");\n adapter = new DirContextAdapter(attrs, new LdapName(\"cn=marissa,ou=Users,dc=test,dc=com\"));\n mapper.setGivenNameAttributeName(\"givenName\");\n\n ExtendedL...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ExtendedLdapUserMapper.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ExtendedLdapUserMapper.class);", "type": "Logger", "var_name": "logger"...
{ "body": "public void setGivenNameAttributeName(String givenNameAttributeName) {\n this.givenNameAttributeName = givenNameAttributeName;\n }", "class_method_signature": "ExtendedLdapUserMapper.setGivenNameAttributeName(String givenNameAttributeName)", "constructor": false, "full_signature": "public v...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_346
{ "fields": [ { "declarator": "oAuth2RequestFactory", "modifier": "private", "original_string": "private OAuth2RequestFactory oAuth2RequestFactory;", "type": "OAuth2RequestFactory", "var_name": "oAuth2RequestFactory" }, { "declarator": "uaaAuthorizationEndpoint", ...
{ "body": "@Test\n public void testGetGrantType_id_token_and_token_is_implicit() {\n responseTypes.add(\"id_token\");\n responseTypes.add(\"token\");\n assertEquals(GRANT_TYPE_IMPLICIT, uaaAuthorizationEndpoint.deriveGrantTypeFromResponseType(responseTypes));\n }", "class_method_signature...
{ "fields": [ { "declarator": "AUTHORIZATION_REQUEST = \"authorizationRequest\"", "modifier": "public static final", "original_string": "public static final String AUTHORIZATION_REQUEST = \"authorizationRequest\";", "type": "String", "var_name": "AUTHORIZATION_REQUEST" }, { ...
{ "body": "protected String deriveGrantTypeFromResponseType(Set<String> responseTypes) {\n if (responseTypes.contains(\"token\")) {\n return GRANT_TYPE_IMPLICIT;\n } else if (responseTypes.size() == 1 && responseTypes.contains(\"id_token\")) {\n return GRANT_TYPE_IMPLICIT;\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_203
{ "fields": [ { "declarator": "mockMvc", "modifier": "private", "original_string": "private MockMvc mockMvc;", "type": "MockMvc", "var_name": "mockMvc" }, { "declarator": "webApplicationContext", "modifier": "@Autowired", "original_string": "@Autowired\n ...
{ "body": "@Test\n public void invalid_principal_id() throws Exception {\n MockHttpServletRequestBuilder post = startAcceptInviteFlow(\"a\", \"a\");\n\n Map<String,String> codeData = getInvitationsCode(OriginKeys.UAA);\n codeData.put(\"user_id\", \"invalid id\");\n String codeDataString...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(InvitationsController.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(InvitationsController.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@RequestMapping(value = \"/accept.do\", method = POST)\n public String acceptInvitation(@RequestParam(\"password\") String password,\n @RequestParam(\"password_confirmation\") String passwordConfirmation,\n @RequestParam(\"code\") Strin...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_54
{ "fields": [ { "declarator": "alias = \"saml\"", "modifier": "public static final", "original_string": "public static final String alias = \"saml\";", "type": "String", "var_name": "alias" }, { "declarator": "idpMetaData = \"<?xml version=\\\"1.0\\\"?>\\n\" +\n ...
{ "body": "@Test\n public void test_ipds_for_email_domain() {\n samlProvider1.getConfig().setEmailDomain(Collections.singletonList(\"test.org\"));\n samlProvider2.getConfig().setEmailDomain(Collections.singletonList(\"test.org\"));\n\n List<IdentityProvider> idpsForEmailDomain = filter.getIdps...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(DomainFilter.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(DomainFilter.class);", "type": "Logger", "var_name": "logger" } ], "file": "server/sr...
{ "body": "public static List<IdentityProvider> getIdpsForEmailDomain(List<IdentityProvider> activeProviders, String email) {\n if (!StringUtils.hasText(email) || !email.contains(\"@\")) {\n return EMPTY_LIST;\n }\n final String domain = email.substring(email.indexOf('@') + 1);\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_487
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private JdbcUserGoogleMfaCredentialsProvisioning db;", "type": "JdbcUserGoogleMfaCredentialsProvisioning", "var_name": "db" }, { "declarator": "activeKeyLabel", "modifier": "private", ...
{ "body": "@Test\n void saveUserGoogleMfaCredentials() throws EncryptionServiceException {\n assertEquals(0, jdbcTemplate.queryForList(\"SELECT * FROM user_google_mfa_credentials\").size());\n UserGoogleMfaCredentials userGoogleMfaCredentials = new UserGoogleMfaCredentials(\"jabbahut\",\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JdbcUserGoogleMfaCredentialsProvisioning.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(JdbcUserGoogleMfaCredentialsProvisioning.class);", "type": "Logger", ...
{ "body": "@Override\n public void save(UserGoogleMfaCredentials credentials, String zoneId) {\n try {\n jdbcTemplate.update(CREATE_USER_MFA_CONFIG_SQL, ps -> {\n int pos = 1;\n ps.setString(pos++, credentials.getUserId());\n try {\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_468
{ "fields": [ { "declarator": "validator", "modifier": "", "original_string": "GeneralMfaProviderValidator validator;", "type": "GeneralMfaProviderValidator", "var_name": "validator" }, { "declarator": "expectedException = ExpectedException.none()", "modifier": "@...
{ "body": "@Test\n public void validateProviderNullType() {\n expectedException.expect(InvalidMfaProviderException.class);\n expectedException.expectMessage(\"Provider type is required. Must be one of \" + MfaProvider.MfaProviderType.getStringValues());\n MfaProvider provider = createValidGoog...
{ "fields": [], "file": "server/src/main/java/org/cloudfoundry/identity/uaa/mfa/GeneralMfaProviderValidator.java", "identifier": "GeneralMfaProviderValidator", "interfaces": "implements MfaProviderValidator", "methods": [ { "class_method_signature": "GeneralMfaProviderValidator.validate(MfaProvider ...
{ "body": "@Override\n public void validate(MfaProvider mfaProvider) {\n if(mfaProvider.getName() == null || StringUtils.isEmpty(mfaProvider.getName().trim())) {\n throw new InvalidMfaProviderException(\"Provider name is required\");\n }\n mfaProvider.setName(mfaProvider.getName().t...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_192
{ "fields": [ { "declarator": "emailChangeEmailService", "modifier": "private", "original_string": "private EmailChangeEmailService emailChangeEmailService;", "type": "EmailChangeEmailService", "var_name": "emailChangeEmailService" }, { "declarator": "mockScimUserProvis...
{ "body": "@Test\n void completeActivationWithInvalidClientId() {\n Map<String, String> codeData = new HashMap<>();\n codeData.put(\"user_id\", \"user-001\");\n codeData.put(\"client_id\", \"invalid-client\");\n codeData.put(\"email\", \"new@example.com\");\n\n when(mockExpiringC...
{ "fields": [ { "declarator": "CHANGE_EMAIL_REDIRECT_URL = \"change_email_redirect_url\"", "modifier": "static final", "original_string": "static final String CHANGE_EMAIL_REDIRECT_URL = \"change_email_redirect_url\";", "type": "String", "var_name": "CHANGE_EMAIL_REDIRECT_URL" },...
{ "body": "@Override\n public Map<String, String> completeVerification(String code) {\n ExpiringCode expiringCode = codeStore.retrieveCode(code, identityZoneManager.getCurrentIdentityZoneId());\n if ((null == expiringCode) || ((null != expiringCode.getIntent()) && !EMAIL.name().equals(expiringCode.ge...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_311
{ "fields": [ { "declarator": "factory", "modifier": "private", "original_string": "private CurrentUserCookieFactory factory;", "type": "CurrentUserCookieFactory", "var_name": "factory" }, { "declarator": "sessionTimeout", "modifier": "private", "original_st...
{ "body": "@Test\n void getCookie_doesNotIncludePersonallyIdentifiableInformation() throws Exception {\n Cookie cookie = factory.getCookie(uaaPrincipal);\n assertThat(cookie.getValue(), not(containsString(username)));\n assertThat(cookie.getValue(), not(containsString(email)));\n }", "cla...
{ "fields": [ { "declarator": "CURRENT_USER_COOKIE_NAME = \"Current-User\"", "modifier": "public", "original_string": "public String CURRENT_USER_COOKIE_NAME = \"Current-User\";", "type": "String", "var_name": "CURRENT_USER_COOKIE_NAME" }, { "declarator": "secure", ...
{ "body": "public Cookie getCookie(UaaPrincipal uaaPrincipal) throws CurrentUserCookieEncodingException {\n CurrentUserInformation currentUserInformation = new CurrentUserInformation();\n currentUserInformation.setUserId(uaaPrincipal.getId());\n Cookie cookie = new Cookie(CURRENT_USER_COOKIE_NAME...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_254
{ "fields": [ { "declarator": "samlTestUtils = new SamlTestUtils()", "modifier": "private final", "original_string": "private final SamlTestUtils samlTestUtils = new SamlTestUtils();", "type": "SamlTestUtils", "var_name": "samlTestUtils" }, { "declarator": "conf = null"...
{ "body": "@Test\n public void testGetExtendedMetadataDelegateUrl() throws MetadataProviderException {\n slowHttpServer.run();\n expectedEx.expect(MetadataProviderException.class);\n expectedEx.expectMessage(\"Unavailable Metadata Provider\");\n\n SamlServiceProvider provider = mockSaml...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SamlServiceProviderConfigurator.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SamlServiceProviderConfigurator.class);", "type": "Logger", "var_nam...
{ "body": "public ExtendedMetadataDelegate getExtendedMetadataDelegate(SamlServiceProvider provider)\n throws MetadataProviderException {\n ExtendedMetadataDelegate metadata;\n switch (provider.getConfig().getType()) {\n case DATA: {\n metadata = configureXMLMetadata(provi...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_310
{ "fields": [ { "declarator": "factory", "modifier": "private", "original_string": "private CurrentUserCookieFactory factory;", "type": "CurrentUserCookieFactory", "var_name": "factory" }, { "declarator": "sessionTimeout", "modifier": "private", "original_st...
{ "body": "@Test\n void getNullCookie() {\n Cookie cookie = factory.getNullCookie();\n\n assertEquals(\"Current-User\", cookie.getName());\n assertFalse(cookie.isHttpOnly());\n assertEquals(0, cookie.getMaxAge());\n assertEquals(\"/\", cookie.getPath());\n }", "class_method_...
{ "fields": [ { "declarator": "CURRENT_USER_COOKIE_NAME = \"Current-User\"", "modifier": "public", "original_string": "public String CURRENT_USER_COOKIE_NAME = \"Current-User\";", "type": "String", "var_name": "CURRENT_USER_COOKIE_NAME" }, { "declarator": "secure", ...
{ "body": "public Cookie getNullCookie() {\n Cookie currentUserCookie = new Cookie(CURRENT_USER_COOKIE_NAME, null);\n currentUserCookie.setHttpOnly(false);\n currentUserCookie.setMaxAge(0);\n currentUserCookie.setPath(\"/\");\n return currentUserCookie;\n }", "class_method_sign...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...