id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
113597154_579
{ "fields": [ { "declarator": "finder", "modifier": "private", "original_string": "private KeyDescriptorFinder finder;", "type": "KeyDescriptorFinder", "var_name": "finder" } ], "file": "hub-saml/src/test/java/uk/gov/ida/saml/metadata/transformers/KeyDescriptorFinderTest.java...
{ "body": "@Test\n public void find_shouldThrowExceptionWhenKeyNameIsPresentButDoesNotMatchExpectedEntityId() throws Exception {\n final KeyDescriptor keyDescriptor = KeyDescriptorBuilder.aKeyDescriptor().withUse(UsageType.SIGNING.toString()).build();\n\n SamlTransformationErrorManagerTestHelper.vali...
{ "fields": [], "file": "hub-saml/src/main/java/uk/gov/ida/saml/metadata/transformers/KeyDescriptorFinder.java", "identifier": "KeyDescriptorFinder", "interfaces": "", "methods": [ { "class_method_signature": "KeyDescriptorFinder.find(\n List<KeyDescriptor> keyDescriptors,\n Us...
{ "body": "public KeyDescriptor find(\n List<KeyDescriptor> keyDescriptors,\n UsageType usageType,\n String entityId) {\n\n return keyDescriptors.stream()\n .filter(keyDescriptor -> keyDescriptor.getUse().equals(usageType))\n .filter(keyDescriptor ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_257
{ "fields": [ { "declarator": "SIGNATURE_RSA_SHA256 = new SignatureRSASHA256()", "modifier": "private static final", "original_string": "private static final SignatureAlgorithm SIGNATURE_RSA_SHA256 = new SignatureRSASHA256();", "type": "SignatureAlgorithm", "var_name": "SIGNATURE_RSA...
{ "body": "@Test\n public void shouldNotReportStrongAlgorithmsInIDPResponse() throws Exception {\n final InboundResponseFromIdp inboundResponseFromIdp = new InboundResponseFromIdp(\n ID,\n IN_RESPONSE_TO,\n ISSUER_IDP,\n ISSUE_INSTANT,\n ...
{ "fields": [ { "declarator": "SIGNATURE_AND_DIGEST_ALGORITHMS_MESSAGE =\n \"%s is using %s and %s for signature and digest method algorithms in %s respectively.\"", "modifier": "public static final", "original_string": "public static final String SIGNATURE_AND_DIGEST_ALGORITHMS_MESSA...
{ "body": "public static void probeResponseForMethodAlgorithm(final InboundResponseFromIdp response) {\n if (response != null) {\n response.getSignature().ifPresent((signature) ->\n logMethodAlgorithm(Role.IDP, signature, Response.DEFAULT_ELEMENT_LOCAL_NAME)\n );\n }...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_607
{ "fields": [ { "declarator": "duplicateAssertionValidator", "modifier": "@Mock\n private", "original_string": "@Mock\n private DuplicateAssertionValidator duplicateAssertionValidator;", "type": "DuplicateAssertionValidator", "var_name": "duplicateAssertionValidator" }, ...
{ "body": "@Test\n public void validate_shouldPassValidation() throws Exception {\n AuthnStatement authnStatement = AuthnStatementBuilder.anAuthnStatement().build();\n Assertion assertion = AssertionBuilder.anAssertion().addAuthnStatement(authnStatement).buildUnencrypted();\n\n validator.valid...
{ "fields": [ { "declarator": "duplicateAssertionValidator", "modifier": "private final", "original_string": "private final DuplicateAssertionValidator duplicateAssertionValidator;", "type": "DuplicateAssertionValidator", "var_name": "duplicateAssertionValidator" } ], "file":...
{ "body": "public void validate(Assertion assertion) {\n validateAuthnStatement(assertion.getAuthnStatements().get(0));\n duplicateAssertionValidator.validateAuthnStatementAssertion(assertion);\n }", "class_method_signature": "AuthnStatementAssertionValidator.validate(Assertion assertion)", "cons...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_312
{ "fields": [ { "declarator": "samlEngineProxy", "modifier": "@Mock\n private", "original_string": "@Mock\n private SamlEngineProxy samlEngineProxy;", "type": "SamlEngineProxy", "var_name": "samlEngineProxy" }, { "declarator": "samlSoapProxyProxy", "modifier...
{ "body": "@Test\n public void shouldGenerateAttributeQueryAndSendRequestToMatchingService() {\n // Given\n AttributeQueryRequestDto attributeQueryRequestDto = AttributeQueryRequestBuilder.anAttributeQueryRequest().build();\n AttributeQueryContainerDto build = anAttributeQueryContainerDto().bu...
{ "fields": [ { "declarator": "samlEngineProxy", "modifier": "private final", "original_string": "private final SamlEngineProxy samlEngineProxy;", "type": "SamlEngineProxy", "var_name": "samlEngineProxy" }, { "declarator": "samlSoapProxyProxy", "modifier": "privat...
{ "body": "public void sendAttributeQueryRequest(\n final SessionId sessionId,\n final AbstractAttributeQueryRequestDto attributeQueryRequestDto) {\n AttributeQueryContainerDto attributeQueryContainerDto = attributeQueryRequestDto.sendToSamlEngine(samlEngineProxy);\n generateAndSendMatchin...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_64
{ "fields": [ { "declarator": "MATCHING_SERVICE_ENTITY_ID = \"matching-service-entity-id\"", "modifier": "private static final", "original_string": "private static final String MATCHING_SERVICE_ENTITY_ID = \"matching-service-entity-id\";", "type": "String", "var_name": "MATCHING_SERV...
{ "body": "@Test\n public void start_shouldThrowExceptionWhenOnboardingTransactionEntityIdCheckFails() {\n final String idpEntityId = \"idp-entity-id\";\n final String simpleId = \"simple-id\";\n final String matchingServiceEntityId = \"matching-service-entity-id\";\n final String nonEx...
{ "fields": [ { "declarator": "identityProviderConfigDataSource", "modifier": "private final", "original_string": "private final ConfigDataSource<IdentityProviderConfig> identityProviderConfigDataSource;", "type": "ConfigDataSource<IdentityProviderConfig>", "var_name": "identityProvi...
{ "body": "@Override\n public void start() {\n cacheConfigData();\n\n checkForDuplicateEntityIds();\n checkEachTransactionHasCorrespondingEntryInMatchingService();\n checkEachOnboardingIdentityProviderHasACorrespondingTransaction();\n checkThereAreNoInvalidCertificates();\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_191
{ "fields": [ { "declarator": "soapMessageManager", "modifier": "@Mock\n private", "original_string": "@Mock\n private SoapMessageManager soapMessageManager;", "type": "SoapMessageManager", "var_name": "soapMessageManager" }, { "declarator": "client", "modif...
{ "body": "@Test\n public void makePost_checkUniformInterfaceExceptionIsThrownOnNon200StatusCode() throws IOException, SAXException, ParserConfigurationException, URISyntaxException {\n when(response.getStatus()).thenReturn(303);\n when(webResourceBuilder.post(any(Entity.class))).thenReturn(response)...
{ "fields": [ { "declarator": "client", "modifier": "private final", "original_string": "private final Client client;", "type": "Client", "var_name": "client" }, { "declarator": "soapMessageManager", "modifier": "private final", "original_string": "private f...
{ "body": "public Element makeSoapRequest(Element requestElement, URI uri) throws SOAPRequestError {\n return makePost(uri, requestElement).getBody();\n }", "class_method_signature": "SoapRequestClient.makeSoapRequest(Element requestElement, URI uri)", "constructor": false, "full_signature": "public E...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_484
{ "fields": [ { "declarator": "assertionStringTransformer", "modifier": "@Mock\n private", "original_string": "@Mock\n private XmlObjectToBase64EncodedStringTransformer<Assertion> assertionStringTransformer;", "type": "XmlObjectToBase64EncodedStringTransformer<Assertion>", "var...
{ "body": "@Test\n public void transform_shouldHandleFraudAuthnStatementAndSetThatAssertionIsForFraudulentEventAndSetFraudDetails() throws Exception {\n final AuthnContextClassRef authnContextClassRef = anAuthnContextClassRef().withAuthnContextClasRefValue(IdaAuthnContext.LEVEL_X_AUTHN_CTX).build();\n ...
{ "fields": [ { "declarator": "VALID_GPG45_STATUSES = List.of(\"DF01\", \"FI01\", \"IT01\")", "modifier": "private static final", "original_string": "private static final List<String> VALID_GPG45_STATUSES = List.of(\"DF01\", \"FI01\", \"IT01\");", "type": "List<String>", "var_name": ...
{ "body": "public PassthroughAssertion fromAssertion(Assertion assertion) {\n return fromAssertion(assertion, false);\n }", "class_method_signature": "PassthroughAssertionUnmarshaller.fromAssertion(Assertion assertion)", "constructor": false, "full_signature": "public PassthroughAssertion fromAssertio...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_611
{ "fields": [ { "declarator": "duplicateAssertionValidator", "modifier": "@Mock\n private", "original_string": "@Mock\n private DuplicateAssertionValidator duplicateAssertionValidator;", "type": "DuplicateAssertionValidator", "var_name": "duplicateAssertionValidator" }, ...
{ "body": "@Test\n public void validate_shouldThrowExceptionIfAuthnInstantIsAbsent() throws Exception {\n AuthnStatement authnStatement = AuthnStatementBuilder.anAuthnStatement().withAuthnInstant(null).build();\n Assertion assertion = AssertionBuilder.anAssertion().addAuthnStatement(authnStatement).b...
{ "fields": [ { "declarator": "duplicateAssertionValidator", "modifier": "private final", "original_string": "private final DuplicateAssertionValidator duplicateAssertionValidator;", "type": "DuplicateAssertionValidator", "var_name": "duplicateAssertionValidator" } ], "file":...
{ "body": "public void validate(Assertion assertion) {\n validateAuthnStatement(assertion.getAuthnStatements().get(0));\n duplicateAssertionValidator.validateAuthnStatementAssertion(assertion);\n }", "class_method_signature": "AuthnStatementAssertionValidator.validate(Assertion assertion)", "cons...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_241
{ "fields": [ { "declarator": "samlEngineExceptionMapper", "modifier": "", "original_string": "SamlEngineExceptionMapper samlEngineExceptionMapper;", "type": "SamlEngineExceptionMapper", "var_name": "samlEngineExceptionMapper" }, { "declarator": "levelLoggerFactory", ...
{ "body": "@Test\n public void shouldHandleSamlRequestTooOldExceptionCorrectly() throws Exception {\n SamlTransformationErrorException exception = new SamlRequestTooOldException(\"error\", new RuntimeException(), Level.DEBUG);\n\n final Response response = samlEngineExceptionMapper.toResponse(excepti...
{ "fields": [ { "declarator": "HAS_NOT_BEEN_AUDITED_YET = false", "modifier": "private static final", "original_string": "private static final boolean HAS_NOT_BEEN_AUDITED_YET = false;", "type": "boolean", "var_name": "HAS_NOT_BEEN_AUDITED_YET" }, { "declarator": "level...
{ "body": "@Override\n public Response toResponse(Exception exception) {\n final UUID errorId = UUID.randomUUID();\n Response.ResponseBuilder response = Response.status(Response.Status.BAD_REQUEST);\n\n // when creating a new exception here we want to create an unaudited application exception ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_304
{ "fields": [ { "declarator": "ANALYTICS_SESSION_ID = \"anAnalyticsSessionId\"", "modifier": "private static final", "original_string": "private static final String ANALYTICS_SESSION_ID = \"anAnalyticsSessionId\";", "type": "String", "var_name": "ANALYTICS_SESSION_ID" }, { ...
{ "body": "@Test\n public void getAuthnResponseFromCountryContainerDtoReturnsAnAuthnResponseFromCountryContainerDto() throws URISyntaxException {\n NonMatchingJourneySuccessStateController stateContoller = mock(NonMatchingJourneySuccessStateController.class);\n when(sessionRepository.getStateControll...
{ "fields": [ { "declarator": "sessionRepository", "modifier": "private final", "original_string": "private final SessionRepository sessionRepository;", "type": "SessionRepository", "var_name": "sessionRepository" }, { "declarator": "hubEventLogger", "modifier": "...
{ "body": "public AuthnResponseFromCountryContainerDto getAuthnResponseFromCountryContainerDto(SessionId sessionId) {\n NonMatchingJourneySuccessStateController stateController = (NonMatchingJourneySuccessStateController)\n sessionRepository.getStateController(sessionId, ResponsePreparedState.cl...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_187
{ "fields": [ { "declarator": "soapMessageManager", "modifier": "@Mock\n private", "original_string": "@Mock\n private SoapMessageManager soapMessageManager;", "type": "SoapMessageManager", "var_name": "soapMessageManager" }, { "declarator": "client", "modif...
{ "body": "@Test\n public void makePost_shouldEnsureResponseInputStreamIsClosedWhenResponseCodeIsNot200() throws URISyntaxException {\n when(response.getStatus()).thenReturn(502);\n URI matchingServiceUri = new URI(\"http://heyyeyaaeyaaaeyaeyaa.com/abc1\");\n\n try {\n healthCheckSo...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(HealthCheckSoapRequestClient.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(HealthCheckSoapRequestClient.class);", "type": "Logger", "var_name": "L...
{ "body": "public HealthCheckResponse makeSoapRequestForHealthCheck(Element requestElement, URI uri) {\n LOG.info(MessageFormat.format(\"Making SOAP request to: {0}\", uri));\n\n try {\n SoapResponse response = makePost(uri, requestElement);\n return new HealthCheckResponse(respons...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_72
{ "fields": [], "file": "hub/config/src/test/java/uk/gov/ida/hub/config/exceptions/ConfigValidationExceptionTest.java", "identifier": "ConfigValidationExceptionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createTransactionsRequireUnsupportedLevelOfAssurance() throws Exception {\n ConfigValidationException exception = ConfigValidationException.createTransactionsRequireUnsupportedLevelOfAssurance(singletonList(aTransactionConfigData().build()));\n assertThat(exception.getM...
{ "fields": [], "file": "hub/config/src/main/java/uk/gov/ida/hub/config/exceptions/ConfigValidationException.java", "identifier": "ConfigValidationException", "interfaces": "", "methods": [ { "class_method_signature": "ConfigValidationException.ConfigValidationException(String message)", "cons...
{ "body": "public static ConfigValidationException createTransactionsRequireUnsupportedLevelOfAssurance(Collection<TransactionConfig> badTransactionConfigs) {\n return new ConfigValidationException(badTransactionConfigs.stream()\n .map(entityData -> MessageFormat.format(\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_168
{ "fields": [ { "declarator": "serviceInfoConfiguration = new ServiceInfoConfiguration(\"a service name\")", "modifier": "private final", "original_string": "private final ServiceInfoConfiguration serviceInfoConfiguration = new ServiceInfoConfiguration(\"a service name\");", "type": "Servi...
{ "body": "@Test\n public void run_shouldSendResponse() throws Exception {\n final Element matchingServiceResponse = XmlUtils.convertToElement(\"<someResponse/>\");\n\n when(executeAttributeQueryRequest.execute(sessionId, attributeQueryContainerDto))\n .thenReturn(matchingServiceRespon...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AttributeQueryRequestRunnable.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AttributeQueryRequestRunnable.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n public void run() {\n counter.dec();\n\n // see https://github.com/google/guice/wiki/CustomScopes for details on this work\n\n addSessionIdToLoggingContext(sessionId);\n\n try {\n timeoutEvaluator.hasAttributeQueryTimedOut(attributeQueryContainerDto);\n...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_492
{ "fields": [ { "declarator": "encrypter", "modifier": "private static", "original_string": "private static Encrypter encrypter;", "type": "Encrypter", "var_name": "encrypter" }, { "declarator": "unmarshaller", "modifier": "private", "original_string": "priv...
{ "body": "@Test\n public void fromSamlMessage_shouldMapAuthnRequestToAuthnRequestFromRelyingParty() throws Exception {\n DateTime issueInstant = new DateTime();\n SignatureImpl signature = new SignatureBuilder().buildObject();\n\n AuthnRequest authnRequest = new AuthnRequestBuilder().buildObj...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AuthnRequestFromRelyingPartyUnmarshaller.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AuthnRequestFromRelyingPartyUnmarshaller.class);", "type": "Logge...
{ "body": "public AuthnRequestFromRelyingParty fromSamlMessage(AuthnRequest authnRequest) {\n final String id = authnRequest.getID();\n final String issuerId = authnRequest.getIssuer().getValue();\n final DateTime issueInstant = authnRequest.getIssueInstant();\n final Boolean forceAuthn = ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_538
{ "fields": [ { "declarator": "duplicateAuthnRequestValidator", "modifier": "private", "original_string": "private DuplicateAuthnRequestValidator duplicateAuthnRequestValidator;", "type": "DuplicateAuthnRequestValidator", "var_name": "duplicateAuthnRequestValidator" }, { ...
{ "body": "@Test\n public void valid_shouldPassIfTheAuthnRequestIsNotADuplicateOfAPreviousOne() throws Exception {\n duplicateAuthnRequestValidator.valid(\"some-request-id\");\n\n boolean isValid = duplicateAuthnRequestValidator.valid(\"another-request-id\");\n assertThat(isValid).isEqualTo(tr...
{ "fields": [ { "declarator": "previousRequests", "modifier": "private final", "original_string": "private final IdExpirationCache<AuthnRequestIdKey> previousRequests;", "type": "IdExpirationCache<AuthnRequestIdKey>", "var_name": "previousRequests" }, { "declarator": "e...
{ "body": "public boolean valid(String requestId) {\n AuthnRequestIdKey key = new AuthnRequestIdKey(requestId);\n\n if (previousRequests.contains(key) && previousRequests.getExpiration(key).isAfterNow()) {\n return false;\n }\n DateTime expire = DateTime.now().plus(expirationDur...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_216
{ "fields": [ { "declarator": "HUB_ENTITY_ID = \"HUB_ENTITY_ID\"", "modifier": "public static final", "original_string": "public static final String HUB_ENTITY_ID = \"HUB_ENTITY_ID\";", "type": "String", "var_name": "HUB_ENTITY_ID" }, { "declarator": "idaAuthnRequestTra...
{ "body": "@Test\n public void shouldUseMinimumComparisonTypeAndDuplicateSingleLevelOfAssurance(){\n IdaAuthnRequestFromHubDto idaAuthnRequestFromHubDto = aRequestDto(singletonList(AuthnContext.LEVEL_2), false);\n\n IdaAuthnRequestFromHub idaAuthnRequestFromHub = idaAuthnRequestTranslator.getIdaAuthn...
{ "fields": [], "file": "hub/saml-engine/src/main/java/uk/gov/ida/hub/samlengine/services/IdaAuthnRequestTranslator.java", "identifier": "IdaAuthnRequestTranslator", "interfaces": "", "methods": [ { "class_method_signature": "IdaAuthnRequestTranslator.IdaAuthnRequestTranslator()", "constructor...
{ "body": "public IdaAuthnRequestFromHub getIdaAuthnRequestFromHub(IdaAuthnRequestFromHubDto idaAuthnRequestFromHubDto, URI ssoUri, String hubEntityId) {\n List<AuthnContext> levelsOfAssurance = idaAuthnRequestFromHubDto.getLevelsOfAssurance();\n AuthnContextComparisonTypeEnumeration comparisonType;\n\n...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_353
{ "fields": [ { "declarator": "eventLogger", "modifier": "@Mock\n private", "original_string": "@Mock\n private HubEventLogger eventLogger;", "type": "HubEventLogger", "var_name": "eventLogger" }, { "declarator": "samlEngineProxy", "modifier": "@Mock\n pr...
{ "body": "@Test(expected = SessionNotFoundException.class)\n public void handle_shouldThrowExceptionIfSessionDoesNotExistInMSResponseFailureCase() {\n when(sessionRepository.sessionExists(sessionId)).thenReturn(false);\n\n matchingServiceResponseService.handleFailure(sessionId);\n }", "class_me...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(MatchingServiceResponseService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(MatchingServiceResponseService.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "public void handleFailure(SessionId sessionId) {\n getSessionIfItExists(sessionId);\n logRequesterErrorAndUpdateState(sessionId, \"received failure notification from saml-soap-proxy\");\n }", "class_method_signature": "MatchingServiceResponseService.handleFailure(SessionId sessionId)", ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_25
{ "fields": [ { "declarator": "levelLogger", "modifier": "@Mock\n private", "original_string": "@Mock\n private LevelLogger levelLogger;", "type": "LevelLogger", "var_name": "levelLogger" }, { "declarator": "contextProvider", "modifier": "@Mock\n private"...
{ "body": "@Test\n public void shouldCreateAuditedErrorResponseForInvalidSaml() throws Exception {\n Response response = exceptionMapper.handleException(new TestSamlTransformationErrorException(\"error\", new RuntimeException(), Level.DEBUG));\n\n ErrorStatusDto responseEntity = (ErrorStatusDto) resp...
{ "fields": [ { "declarator": "eventSinkMessageSender", "modifier": "private", "original_string": "private EventSinkMessageSender eventSinkMessageSender;", "type": "EventSinkMessageSender", "var_name": "eventSinkMessageSender" }, { "declarator": "levelLogger", "mo...
{ "body": "@Override\n protected Response handleException(SamlTransformationErrorException exception) {\n UUID errorId = UUID.randomUUID();\n\n eventSinkMessageSender.audit(exception, errorId, getSessionId().orElse(SessionId.NO_SESSION_CONTEXT_IN_ERROR));\n levelLogger.log(exception.getLogLeve...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_580
{ "fields": [ { "declarator": "metadataResolver", "modifier": "private static", "original_string": "private static MetadataResolver metadataResolver;", "type": "MetadataResolver", "var_name": "metadataResolver" }, { "declarator": "invalidMetadataResolver", "modifi...
{ "body": "@Test\n public void shouldReturnTheSigningPublicKeysForTheHub() throws Exception {\n HubMetadataPublicKeyStore hubMetadataPublicKeyStore = new HubMetadataPublicKeyStore(metadataResolver, new PublicKeyFactory(), TestEntityIds.HUB_ENTITY_ID);\n List<PublicKey> verifyingKeysForEntity = hubMet...
{ "fields": [ { "declarator": "metadataResolver", "modifier": "private final", "original_string": "private final MetadataResolver metadataResolver;", "type": "MetadataResolver", "var_name": "metadataResolver" }, { "declarator": "publicKeyFactory", "modifier": "pri...
{ "body": "@Override\n public List<PublicKey> getVerifyingKeysForEntity() {\n try {\n CriteriaSet criteria = new CriteriaSet(new EntityIdCriterion(hubEntityId));\n return Optional.ofNullable(metadataResolver.resolveSingle(criteria))\n .map(this::getPublicKeys)\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_3
{ "fields": [ { "declarator": "relayStateValidator", "modifier": "@Mock\n private", "original_string": "@Mock\n private RelayStateValidator relayStateValidator;", "type": "RelayStateValidator", "var_name": "relayStateValidator" }, { "declarator": "stringSamlAuthnR...
{ "body": "@Test\n public void handleRequestPost_shouldThrowExceptionWithIssuerInMessageIfInvalidSignature() {\n AuthnRequest authnRequest = anAuthnRequest().withIssuer(anIssuer().withIssuerId(ISSUER_ID).build()).build();\n\n when(stringSamlAuthnRequestTransformer.apply(SAML_REQUEST)).thenReturn(auth...
{ "fields": [ { "declarator": "relayStateValidator", "modifier": "private final", "original_string": "private final RelayStateValidator relayStateValidator;", "type": "RelayStateValidator", "var_name": "relayStateValidator" }, { "declarator": "stringSamlAuthnRequestTran...
{ "body": "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n @Timed\n @ResponseMetered\n public Response handleRequestPost(SamlRequestDto samlRequestDto) {\n\n relayStateValidator.validate(samlRequestDto.getRelayState());\n\n AuthnRequest authnRequest...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_358
{ "fields": [ { "declarator": "levelOfAssuranceValidator", "modifier": "private", "original_string": "private LevelOfAssuranceValidator levelOfAssuranceValidator;", "type": "LevelOfAssuranceValidator", "var_name": "levelOfAssuranceValidator" } ], "file": "hub/policy/src/test/...
{ "body": "@Test\n public void validate_shouldThrowExceptionIfLevelOfAssuranceFromMatchingServiceDoesNotExist() throws Exception {\n LevelOfAssurance levelOfAssurance = LevelOfAssurance.LEVEL_2;\n try {\n levelOfAssuranceValidator.validate(Optional.empty(), levelOfAssurance);\n ...
{ "fields": [], "file": "hub/policy/src/main/java/uk/gov/ida/hub/policy/validators/LevelOfAssuranceValidator.java", "identifier": "LevelOfAssuranceValidator", "interfaces": "", "methods": [ { "class_method_signature": "LevelOfAssuranceValidator.validate(Optional<LevelOfAssurance> responseLevelOfAssu...
{ "body": "public void validate(Optional<LevelOfAssurance> responseLevelOfAssurance, LevelOfAssurance requiredLevelOfAssurance) {\n\n if (!responseLevelOfAssurance.isPresent()) {\n throw noLevelOfAssurance();\n }\n\n if (!responseLevelOfAssurance.get().equals(requiredLevelOfAssurance))...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_421
{ "fields": [ { "declarator": "IDP_ENTITY_ID = \"IDP-a\"", "modifier": "private static final", "original_string": "private static final String IDP_ENTITY_ID = \"IDP-a\";", "type": "String", "var_name": "IDP_ENTITY_ID" }, { "declarator": "OTHER_IDP_ENTITY_ID = \"idp-b\""...
{ "body": "@Test\n public void buildIdpSelectedState_shouldReturnStateWithNewIdpForIdpSelectedState(){\n IdpSelectedState state = IdpSelectedStateBuilder.anIdpSelectedState().withRelayState(\"relay-state\").withIdpEntityId(\"idp-b\")\n .withAvailableIdentityProviders(List.of(IDP_ENTITY_ID, OT...
{ "fields": [], "file": "hub/policy/src/main/java/uk/gov/ida/hub/policy/domain/controller/IdpSelector.java", "identifier": "IdpSelector", "interfaces": "", "methods": [ { "class_method_signature": "IdpSelector.IdpSelector()", "constructor": true, "full_signature": "private IdpSelector()...
{ "body": "public static IdpSelectedState buildIdpSelectedState(IdpSelectingState state,\n String idpEntityId,\n boolean registering,\n LevelOfAssuran...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_134
{ "fields": [ { "declarator": "SUPPORTED_MSA_VERSION_NUMBER = \"supported-version\"", "modifier": "private static final", "original_string": "private static final String SUPPORTED_MSA_VERSION_NUMBER = \"supported-version\";", "type": "String", "var_name": "SUPPORTED_MSA_VERSION_NUMBE...
{ "body": "@Test\n public void shouldReturnVersionIfSameOneIsPresentInResponseIDAndHeaderWithMessageForHealthyMatchingService() {\n final String versionNumber = \"180\";\n final Optional<String> headerVersion = Optional.ofNullable(versionNumber);\n MatchingServiceConfigEntityDataDto matchingSe...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(MatchingServiceHealthChecker.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(MatchingServiceHealthChecker.class);", "type": "Logger", "var_name": "L...
{ "body": "public MatchingServiceHealthCheckResult performHealthCheck(final MatchingServiceConfigEntityDataDto configEntity) {\n MatchingServiceHealthCheckerRequestDto matchingServiceHealthCheckerRequestDto =\n new MatchingServiceHealthCheckerRequestDto(configEntity.getTransactionEntityId(), con...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_564
{ "fields": [ { "declarator": "stringToOpenSamlObjectTransformer", "modifier": "private", "original_string": "private StringToOpenSamlObjectTransformer<AuthnRequest> stringToOpenSamlObjectTransformer;", "type": "StringToOpenSamlObjectTransformer<AuthnRequest>", "var_name": "stringToO...
{ "body": "@Test\n public void shouldNotContainKeyInfoInIdaAuthnRequest() throws Exception {\n Function<IdaAuthnRequestFromHub, String> eidasTransformer = new HubTransformersFactory().getIdaAuthnRequestFromHubToStringTransformer(\n getKeyStore(hubSigningCert),\n signatureAlgori...
{ "fields": [ { "declarator": "coreTransformersFactory", "modifier": "private final", "original_string": "private final CoreTransformersFactory coreTransformersFactory;", "type": "CoreTransformersFactory", "var_name": "coreTransformersFactory" } ], "file": "hub-saml/src/main/...
{ "body": "public Function<IdaAuthnRequestFromHub, String> getIdaAuthnRequestFromHubToStringTransformer(IdaKeyStore keyStore, SignatureAlgorithm signatureAlgorithm, DigestAlgorithm digestAlgorithm) {\n return getAuthnRequestToStringTransformer(false, keyStore, signatureAlgorithm, digestAlgorithm).compose(getId...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_8
{ "fields": [ { "declarator": "relayStateValidator", "modifier": "@Mock\n private", "original_string": "@Mock\n private RelayStateValidator relayStateValidator;", "type": "RelayStateValidator", "var_name": "relayStateValidator" }, { "declarator": "stringSamlAuthnR...
{ "body": "@Test\n public void handleEidasResponsePost_shouldValidateSignatureOfIncomingSamlMessage() {\n when(stringSamlResponseTransformer.apply(SAML_REQUEST)).thenReturn(validSamlResponse);\n ValidatedResponse validatedResponse = new ValidatedResponse(validSamlResponse);\n when(eidasValidat...
{ "fields": [ { "declarator": "relayStateValidator", "modifier": "private final", "original_string": "private final RelayStateValidator relayStateValidator;", "type": "RelayStateValidator", "var_name": "relayStateValidator" }, { "declarator": "stringSamlAuthnRequestTran...
{ "body": "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n @Path(Urls.SamlProxyUrls.EIDAS_RESPONSE_POST_PATH)\n @Timed\n @ResponseMetered\n public Response handleEidasResponsePost(SamlRequestDto samlRequestDto) {\n\n if (eidasValidatorFactory.isPresent(...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_476
{ "fields": [ { "declarator": "ATTRIBUTE_QUERY_CONTAINER_DTO = anAttributeQueryContainerDto().build()", "modifier": "private static final", "original_string": "private static final AttributeQueryContainerDto ATTRIBUTE_QUERY_CONTAINER_DTO = anAttributeQueryContainerDto().build();", "type": ...
{ "body": "@Test\n public void getEncryptedMatchingDataSetAssertion() throws Exception {\n assertThat(attributeQueryRequestDto.getEncryptedMatchingDatasetAssertion()).isEqualTo(ENCRYPTED_MATCHING_DATASET_ASSERTION);\n }", "class_method_signature": "AttributeQueryRequestDtoTest.getEncryptedMatchingDataS...
{ "fields": [ { "declarator": "encryptedMatchingDatasetAssertion", "modifier": "@NotNull\n private final", "original_string": "@NotNull\n private final String encryptedMatchingDatasetAssertion;", "type": "String", "var_name": "encryptedMatchingDatasetAssertion" }, { ...
{ "body": "@Nullable\n public String getEncryptedMatchingDatasetAssertion() {\n return encryptedMatchingDatasetAssertion;\n }", "class_method_signature": "AttributeQueryRequestDto.getEncryptedMatchingDatasetAssertion()", "constructor": false, "full_signature": "@Nullable public String getEncryptedM...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_79
{ "fields": [ { "declarator": "matchingServiceConfigRepository", "modifier": "@Mock\n private", "original_string": "@Mock\n private LocalConfigRepository<MatchingServiceConfig> matchingServiceConfigRepository;", "type": "LocalConfigRepository<MatchingServiceConfig>", "var_name"...
{ "body": "@Test\n public void validator_shouldThrowExceptionWhenMatchingEntityIdIsAbsentIfUsingMatching() throws Exception {\n TransactionConfig transactionConfig = aTransactionConfigData()\n .withMatchingServiceEntityId(null)\n .build();\n\n try {\n validato...
{ "fields": [ { "declarator": "matchingServiceConfigRepository", "modifier": "private", "original_string": "private LocalConfigRepository<MatchingServiceConfig> matchingServiceConfigRepository;", "type": "LocalConfigRepository<MatchingServiceConfig>", "var_name": "matchingServiceConf...
{ "body": "public void validate(TransactionConfig transactionConfig) {\n if (transactionConfig.isUsingMatching()) {\n if (transactionConfig.getMatchingServiceEntityId() == null) {\n throw ConfigValidationException.createMissingMatchingEntityIdException(transactionConfig.getEntityId())...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_96
{ "fields": [ { "declarator": "trustStoreForCertificateProvider", "modifier": "@Mock\n private", "original_string": "@Mock\n private TrustStoreForCertificateProvider trustStoreForCertificateProvider;", "type": "TrustStoreForCertificateProvider", "var_name": "trustStoreForCertif...
{ "body": "@Test\n public void validateLogsErrorForMissingCertificatesWhenNotSelfService() {\n Logger logger = (Logger) LoggerFactory.getLogger(CertificateChainConfigValidator.class);\n ListAppender<ILoggingEvent> listAppender = new ListAppender<>();\n listAppender.start();\n logger.add...
{ "fields": [ { "declarator": "chainValidityChecker", "modifier": "private final", "original_string": "private final CertificateValidityChecker chainValidityChecker;", "type": "CertificateValidityChecker", "var_name": "chainValidityChecker" }, { "declarator": "LOG = Log...
{ "body": "public void validate(Set<CertificateConfigurable<? extends CertificateConfigurable<?>>> configs) {\n configs.stream().forEach(this::validate);\n }", "class_method_signature": "CertificateChainConfigValidator.validate(Set<CertificateConfigurable<? extends CertificateConfigurable<?>>> configs)", ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_533
{ "fields": [ { "declarator": "validator", "modifier": "private", "original_string": "private AuthnRequestFromTransactionValidator validator;", "type": "AuthnRequestFromTransactionValidator", "var_name": "validator" } ], "file": "hub-saml/src/test/java/uk/gov/ida/saml/hub/val...
{ "body": "@Test\n public void validateNameIdPolicy_shouldDoNothingIfNameIdPolicyFormatHasValidValue() throws Exception {\n validator.validate(anAuthnRequest().withNameIdPolicy(aNameIdPolicy().withFormat(NameIDType.PERSISTENT).build()).build());\n\n }", "class_method_signature": "AuthnRequestFromTransa...
{ "fields": [ { "declarator": "issuerValidator", "modifier": "private final", "original_string": "private final IssuerValidator issuerValidator;", "type": "IssuerValidator", "var_name": "issuerValidator" }, { "declarator": "duplicateAuthnRequestValidator", "modifi...
{ "body": "@Override\n public void validate(AuthnRequest request) {\n issuerValidator.validate(request.getIssuer());\n validateRequestId(request);\n validateIssueInstant(request);\n validateSignaturePresence(request);\n validateVersion(request);\n validateNameIdPolicy(requ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_163
{ "fields": [ { "declarator": "HUB_ROLE = SPSSODescriptor.DEFAULT_ELEMENT_NAME", "modifier": "private static final", "original_string": "private static final QName HUB_ROLE = SPSSODescriptor.DEFAULT_ELEMENT_NAME;", "type": "QName", "var_name": "HUB_ROLE" }, { "declarato...
{ "body": "@Test\n public void run_shouldThrowCertChainValidationExceptionOnResponse() throws Exception {\n when(attributeQueryRequestClient.sendQuery(any(Element.class), anyString(), any(SessionId.class), any(URI.class))).thenReturn(matchingServiceResponse);\n final BasicX509Credential x509Credentia...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ExecuteAttributeQueryRequest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ExecuteAttributeQueryRequest.class);", "type": "Logger", "var_name": "L...
{ "body": "public Element execute(SessionId sessionId, AttributeQueryContainerDto attributeQueryContainerDto) {\n\n LOG.info(\"Validating attribute query {}\", attributeQueryContainerDto.getId());\n Element matchingServiceRequest = convertToElementAndValidate(attributeQueryContainerDto);\n\n LOG....
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_499
{ "fields": [ { "declarator": "marshaller = new IdpIdaStatusMarshaller(new OpenSamlXmlObjectFactory())", "modifier": "private final", "original_string": "private final IdpIdaStatusMarshaller marshaller = new IdpIdaStatusMarshaller(new OpenSamlXmlObjectFactory());", "type": "IdpIdaStatusMar...
{ "body": "@Test\n public void shouldMarshallStatusDetailWithStatusValueContainingUpliftFailed() {\n Status status = marshaller.toSamlStatus(IdpIdaStatus.upliftFailed());\n\n StatusValue actual = (StatusValue) status.getStatusDetail().getOrderedChildren().get(0);\n\n assertThat(actual.getNames...
{ "fields": [ { "declarator": "REST_TO_SAML_CODES = Map.of(\n IdpIdaStatus.success(), DetailedStatusCode.Success,\n IdpIdaStatus.noAuthenticationContext(), DetailedStatusCode.NoAuthenticationContext,\n IdpIdaStatus.authenticationFailed(), DetailedStat...
{ "body": "@Override\n protected Optional<StatusDetail> getStatusDetail(IdpIdaStatus originalStatus) {\n if (REST_TO_STATUS_DETAIL.containsKey(originalStatus)) {\n StatusDetail statusDetail = this.samlObjectFactory.createStatusDetail();\n StatusValue statusValue = this.samlObjectFactor...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_319
{ "fields": [ { "declarator": "configProxy", "modifier": "@Mock\n private", "original_string": "@Mock\n private TransactionsConfigProxy configProxy;", "type": "TransactionsConfigProxy", "var_name": "configProxy" }, { "declarator": "sessionRepository", "modif...
{ "body": "@Test(expected = EidasCountryNotSupportedException.class)\n public void shouldReturnErrorWhenAnInvalidCountryIsSelected() {\n setSystemWideCountries(singletonList(COUNTRY_1));\n\n service.setSelectedCountry(sessionId, \"not-a-valid-country-code\");\n }", "class_method_signature": "Cou...
{ "fields": [ { "declarator": "configProxy", "modifier": "private final", "original_string": "private final TransactionsConfigProxy configProxy;", "type": "TransactionsConfigProxy", "var_name": "configProxy" }, { "declarator": "sessionRepository", "modifier": "pri...
{ "body": "public void setSelectedCountry(SessionId sessionId, String countryCode) {\n ensureTransactionSupportsEidas(sessionId);\n\n List<EidasCountryDto> supportedCountries = getCountries(sessionId);\n EidasCountryDto selectedCountry = supportedCountries.stream()\n .filter(country ->...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_460
{ "fields": [ { "declarator": "MSA_ID = \"msa-id\"", "modifier": "private static final", "original_string": "private static final String MSA_ID = \"msa-id\";", "type": "String", "var_name": "MSA_ID" }, { "declarator": "NOW = DateTime.now(DateTimeZone.UTC)", "modif...
{ "body": "@Test\n public void shouldThrowIfIdentityBlobNotPresentInTranslatedResponse() {\n exception.expect(StateProcessingValidationException.class);\n exception.expectMessage(String.format(\"Authn translation for request %s failed with missing mandatory attribute %s\", state.getRequestId(), \"enc...
{ "fields": [ { "declarator": "state", "modifier": "private final", "original_string": "private final EidasCountrySelectedState state;", "type": "EidasCountrySelectedState", "var_name": "state" }, { "declarator": "hubEventLogger", "modifier": "private final", ...
{ "body": "public void handleMatchingJourneySuccessResponseFromCountry(InboundResponseFromCountry translatedResponse,\n String principalIpAddressAsSeenByHub,\n String analyticsSessionId,\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_175
{ "fields": [ { "declarator": "serviceInfoConfiguration = new ServiceInfoConfiguration(\"a service name\")", "modifier": "private final", "original_string": "private final ServiceInfoConfiguration serviceInfoConfiguration = new ServiceInfoConfiguration(\"a service name\");", "type": "Servi...
{ "body": "@Test\n public void run_shouldNotNotifySamlEngineWhenMSAResponseIsReceivedAfterAttributeQueryHasTimedOut() throws IOException, SAXException, ParserConfigurationException {\n final Element matchingServiceResponse = XmlUtils.convertToElement(\"<someResponse/>\");\n when(executeAttributeQuery...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AttributeQueryRequestRunnable.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AttributeQueryRequestRunnable.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n public void run() {\n counter.dec();\n\n // see https://github.com/google/guice/wiki/CustomScopes for details on this work\n\n addSessionIdToLoggingContext(sessionId);\n\n try {\n timeoutEvaluator.hasAttributeQueryTimedOut(attributeQueryContainerDto);\n...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_525
{ "fields": [ { "declarator": "authnRequestIssueInstantValidator = null", "modifier": "", "original_string": "AuthnRequestIssueInstantValidator authnRequestIssueInstantValidator = null;", "type": "AuthnRequestIssueInstantValidator", "var_name": "authnRequestIssueInstantValidator" ...
{ "body": "@Test\n public void validate_shouldReturnFalseIfIssueInstantMoreThan5MinutesAgo() {\n DateTimeFreezer.freezeTime();\n\n DateTime issueInstant = DateTime.now().minusMinutes(AUTHN_REQUEST_VALIDITY_MINS).minusSeconds(1);\n\n boolean validity = authnRequestIssueInstantValidator.isValid(...
{ "fields": [ { "declarator": "samlAuthnRequestValidityDurationConfiguration", "modifier": "private final", "original_string": "private final SamlAuthnRequestValidityDurationConfiguration samlAuthnRequestValidityDurationConfiguration;", "type": "SamlAuthnRequestValidityDurationConfiguratio...
{ "body": "public boolean isValid(DateTime issueInstant) {\n final Duration authnRequestValidityDuration = samlAuthnRequestValidityDurationConfiguration.getAuthnRequestValidityDuration();\n return !issueInstant.isBefore(DateTime.now().minus(authnRequestValidityDuration.toMilliseconds()));\n }", "cl...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_80
{ "fields": [ { "declarator": "matchingServiceConfigRepository", "modifier": "@Mock\n private", "original_string": "@Mock\n private LocalConfigRepository<MatchingServiceConfig> matchingServiceConfigRepository;", "type": "LocalConfigRepository<MatchingServiceConfig>", "var_name"...
{ "body": "@Test\n public void validator_shouldThrowExceptionWhenCorrespondingMatchingServiceConfigurationIsAbsent() throws Exception {\n final String matchingServiceEntityId = \"matching-service-entity-id\";\n TransactionConfig transactionConfig = aTransactionConfigData()\n .withMatch...
{ "fields": [ { "declarator": "matchingServiceConfigRepository", "modifier": "private", "original_string": "private LocalConfigRepository<MatchingServiceConfig> matchingServiceConfigRepository;", "type": "LocalConfigRepository<MatchingServiceConfig>", "var_name": "matchingServiceConf...
{ "body": "public void validate(TransactionConfig transactionConfig) {\n if (transactionConfig.isUsingMatching()) {\n if (transactionConfig.getMatchingServiceEntityId() == null) {\n throw ConfigValidationException.createMissingMatchingEntityIdException(transactionConfig.getEntityId())...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_437
{ "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 shouldCreateACycle0And1MatchRequestSentStateController() {\n StateController controller = stateControllerFactory.build(aCycle0And1MatchRequestSentState().build(), stateTransitionAction);\n\n assertThat(controller).isInstanceOf(Cycle0And1MatchRequestSentStateController.c...
{ "fields": [ { "declarator": "injector", "modifier": "private final", "original_string": "private final Injector injector;", "type": "Injector", "var_name": "injector" } ], "file": "hub/policy/src/main/java/uk/gov/ida/hub/policy/domain/controller/StateControllerFactory.java"...
{ "body": "public <T extends State> StateController build(final T state, final StateTransitionAction stateTransitionAction) {\n PolicyState policyState = PolicyState.fromStateClass(state.getClass());\n switch (policyState) {\n\n case SESSION_STARTED:\n return new SessionStarted...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_38
{ "fields": [ { "declarator": "SERVICE_NAME = \"some-service-name\"", "modifier": "private static final", "original_string": "private static final String SERVICE_NAME = \"some-service-name\";", "type": "String", "var_name": "SERVICE_NAME" }, { "declarator": "SERVICE_INF...
{ "body": "@Test\n public void logAuthenticationRequest_shouldPassHubEventToEventSinkProxy() {\n externalCommunicationEventLogger.logIdpAuthnRequest(MESSAGE_ID, SESSION_ID, ENDPOINT_URL, PRINCIPAL_IP_ADDRESS_AS_SEEN_BY_THE_HUB);\n\n final EventSinkHubEvent expectedEvent = new EventSinkHubEvent(\n ...
{ "fields": [ { "declarator": "serviceInfo", "modifier": "private final", "original_string": "private final ServiceInfoConfiguration serviceInfo;", "type": "ServiceInfoConfiguration", "var_name": "serviceInfo" }, { "declarator": "eventSinkProxy", "modifier": "priv...
{ "body": "public void logIdpAuthnRequest(String messageId, SessionId sessionId, URI targetUrl, String principalIpAddressAsSeenByHub) {\n\n Map<EventDetailsKey, String> details = new HashMap<>();\n details.put(principal_ip_address_as_seen_by_hub, principalIpAddressAsSeenByHub);\n\n logExternalCom...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_572
{ "fields": [ { "declarator": "transformer", "modifier": "private", "original_string": "private HubIdentityProviderMetadataDtoToEntityDescriptorTransformer transformer;", "type": "HubIdentityProviderMetadataDtoToEntityDescriptorTransformer", "var_name": "transformer" } ], "fi...
{ "body": "@Test\n public void transform_shouldTransformIdpSigningCertificates() throws Exception {\n String idpOneIssuerId = UUID.randomUUID().toString();\n String idpTwoIssuerId = UUID.randomUUID().toString();\n final Certificate idpCertOne = aCertificate().withIssuerId(idpOneIssuerId).build...
{ "fields": [ { "declarator": "openSamlXmlObjectFactory", "modifier": "private final", "original_string": "private final OpenSamlXmlObjectFactory openSamlXmlObjectFactory;", "type": "OpenSamlXmlObjectFactory", "var_name": "openSamlXmlObjectFactory" }, { "declarator": "k...
{ "body": "@Override\n public EntityDescriptor apply(HubIdentityProviderMetadataDto dto) {\n final EntityDescriptor entityDescriptor = doTransform(dto);\n\n final List<KeyDescriptor> keyDescriptors = entityDescriptor.getIDPSSODescriptor(SAMLConstants.SAML20P_NS).getKeyDescriptors();\n keyDescr...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_122
{ "fields": [ { "declarator": "matchingServiceHealthChecker", "modifier": "@Mock\n private", "original_string": "@Mock\n private MatchingServiceHealthChecker matchingServiceHealthChecker;", "type": "MatchingServiceHealthChecker", "var_name": "matchingServiceHealthChecker" }...
{ "body": "@Test\n public void handle_shouldExecuteHealthCheckForMatchingServiceWithHealthCheckDisabledWhenForced() {\n MatchingServiceConfigEntityDataDto matchingServiceConfigEntityDataDto = aMatchingServiceConfigEntityDataDto().withHealthCheckDisabled().build();\n when(matchingServiceConfigProxy.ge...
{ "fields": [ { "declarator": "matchingServiceConfigProxy", "modifier": "private final", "original_string": "private final MatchingServiceConfigProxy matchingServiceConfigProxy;", "type": "MatchingServiceConfigProxy", "var_name": "matchingServiceConfigProxy" }, { "decla...
{ "body": "public AggregatedMatchingServicesHealthCheckResult forceCheckAllMSAs() {\n return handle(true);\n }", "class_method_signature": "MatchingServiceHealthCheckHandler.forceCheckAllMSAs()", "constructor": false, "full_signature": "public AggregatedMatchingServicesHealthCheckResult forceCheckAllM...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_335
{ "fields": [ { "declarator": "TIMESTAMP = DateTime.now()", "modifier": "private static final", "original_string": "private static final DateTime TIMESTAMP = DateTime.now();", "type": "DateTime", "var_name": "TIMESTAMP" }, { "declarator": "ASSERTION_CONSUMER_SERVICE_URI...
{ "body": "@Test\n public void shouldReturnOtherResponseIfSessionSessionInEidasAuthnFailedState() {\n when(sessionRepository.sessionExists(SESSION_ID)).thenReturn(true);\n when(sessionRepository.isSessionInState(SESSION_ID, EidasAuthnFailedErrorState.class)).thenReturn(true);\n\n final Respons...
{ "fields": [ { "declarator": "samlEngineProxy", "modifier": "private final", "original_string": "private final SamlEngineProxy samlEngineProxy;", "type": "SamlEngineProxy", "var_name": "samlEngineProxy" }, { "declarator": "samlSoapProxyProxy", "modifier": "privat...
{ "body": "public ResponseAction receiveAuthnResponseFromCountry(SessionId sessionId,\n SamlAuthnResponseContainerDto responseFromCountry) {\n\n if (sessionRepository.sessionExists(sessionId) && sessionRepository.isSessionInState(sessionId, EidasAuthnFai...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_270
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private", "original_string": "private ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" } ], "file": "hub/saml-engine/src/test/java/uk/gov/ida/hub/samlengine/loggi...
{ "body": "@Test\n public void shouldLogDateOfBirthHistory() throws Exception {\n Attribute dateOfBirthAttribute = new AttributeBuilder().buildObject();\n dateOfBirthAttribute.setName(IdaConstants.Attributes_1_1.DateOfBirth.NAME);\n\n AttributeValue oldDateOfBirthAttributeValue = new DateAttri...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(VerifiedAttributesLogger.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(VerifiedAttributesLogger.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "public static String formatAttributes(\n String issuer,\n LevelOfAssurance levelOfAssurance,\n List<Attribute> attributes\n ) throws JsonProcessingException {\n AttributeStatementLogData attributeStatementLogDto = new AttributeStatementLogData(\n issuer,\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_509
{ "fields": [ { "declarator": "marshaller", "modifier": "private", "original_string": "private HubAssertionMarshaller marshaller;", "type": "HubAssertionMarshaller", "var_name": "marshaller" }, { "declarator": "attributeFactory = null", "modifier": "@Mock\n pri...
{ "body": "@Test\n public void transform_shouldTransformAssertionId() throws Exception {\n String assertionId = \"assertion-id\";\n HubAssertion assertion = aHubAssertion().withId(assertionId).build();\n\n Assertion transformedAssertion = marshaller.toSaml(assertion);\n\n assertThat(tra...
{ "fields": [ { "declarator": "openSamlXmlObjectFactory", "modifier": "private final", "original_string": "private final OpenSamlXmlObjectFactory openSamlXmlObjectFactory;", "type": "OpenSamlXmlObjectFactory", "var_name": "openSamlXmlObjectFactory" }, { "declarator": "a...
{ "body": "public Assertion toSaml(HubAssertion hubAssertion) {\n\n Assertion transformedAssertion = openSamlXmlObjectFactory.createAssertion();\n transformedAssertion.setIssueInstant(hubAssertion.getIssueInstant());\n Issuer transformedIssuer = openSamlXmlObjectFactory.createIssuer(hubAssertion....
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_159
{ "fields": [ { "declarator": "HUB_ROLE = SPSSODescriptor.DEFAULT_ELEMENT_NAME", "modifier": "private static final", "original_string": "private static final QName HUB_ROLE = SPSSODescriptor.DEFAULT_ELEMENT_NAME;", "type": "QName", "var_name": "HUB_ROLE" }, { "declarato...
{ "body": "@Test\n public void run_shouldCallSamlMessageSignatureValidatorWithResponse() throws Exception {\n when(attributeQueryRequestClient.sendQuery(any(Element.class), anyString(), any(SessionId.class), any(URI.class))).thenReturn(matchingServiceResponse);\n Response response = aResponse().withI...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ExecuteAttributeQueryRequest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ExecuteAttributeQueryRequest.class);", "type": "Logger", "var_name": "L...
{ "body": "public Element execute(SessionId sessionId, AttributeQueryContainerDto attributeQueryContainerDto) {\n\n LOG.info(\"Validating attribute query {}\", attributeQueryContainerDto.getId());\n Element matchingServiceRequest = convertToElementAndValidate(attributeQueryContainerDto);\n\n LOG....
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_43
{ "fields": [ { "declarator": "IDP_ENTITY_ID_1 = TestEntityIds.STUB_IDP_ONE", "modifier": "private static final", "original_string": "private static final String IDP_ENTITY_ID_1 = TestEntityIds.STUB_IDP_ONE;", "type": "String", "var_name": "IDP_ENTITY_ID_1" }, { "declar...
{ "body": "@Test\n public void getVerifyingKeysForEntity_shouldGetVerifyingKeysFromConfigCertificateProxy() {\n configServiceKeyStore.getVerifyingKeysForEntity(issuerId);\n\n verify(certificatesConfigProxy).getSignatureVerificationCertificates(issuerId);\n }", "class_method_signature": "ConfigSe...
{ "fields": [ { "declarator": "certificatesConfigProxy", "modifier": "private final", "original_string": "private final CertificatesConfigProxy certificatesConfigProxy;", "type": "CertificatesConfigProxy", "var_name": "certificatesConfigProxy" }, { "declarator": "certif...
{ "body": "public List<PublicKey> getVerifyingKeysForEntity(String entityId) {\n Collection<CertificateDto> certificates = certificatesConfigProxy.getSignatureVerificationCertificates(entityId);\n List<PublicKey> publicKeys = new ArrayList<>();\n for (CertificateDto keyFromConfig : certificates) ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_362
{ "fields": [ { "declarator": "EXPIRY_TIME = 1L", "modifier": "private static final", "original_string": "private static final Long EXPIRY_TIME = 1L;", "type": "Long", "var_name": "EXPIRY_TIME" }, { "declarator": "redisSessionStore", "modifier": "private", "...
{ "body": "@Test\n public void shouldCheckIfSessionExists() {\n SessionId sessionId = aSessionId().build();\n redisSessionStore.hasSession(sessionId);\n\n verify(redis).exists(sessionId);\n }", "class_method_signature": "RedisSessionStoreTest.shouldCheckIfSessionExists()", "constructor"...
{ "fields": [ { "declarator": "dataStore", "modifier": "private final", "original_string": "private final RedisCommands<SessionId, State> dataStore;", "type": "RedisCommands<SessionId, State>", "var_name": "dataStore" }, { "declarator": "recordTTL", "modifier": "p...
{ "body": "@Override\n public boolean hasSession(SessionId sessionId) {\n return dataStore.exists(sessionId) > 0;\n }", "class_method_signature": "RedisSessionStore.hasSession(SessionId sessionId)", "constructor": false, "full_signature": "@Override public boolean hasSession(SessionId sessionId)", ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_227
{ "fields": [ { "declarator": "BASE_64_SAML_RESPONSE = \"base64SamlResponse\"", "modifier": "private static final", "original_string": "private static final String BASE_64_SAML_RESPONSE = \"base64SamlResponse\";", "type": "String", "var_name": "BASE_64_SAML_RESPONSE" }, { ...
{ "body": "@Test\n public void generateShouldReturnAnAuthnResponseFromHubContainerDtoFromAuthnResponseFromCountryContainerDto() {\n OutboundAuthnResponseFromCountryContainerToStringFunction transformerMock = mock(OutboundAuthnResponseFromCountryContainerToStringFunction.class);\n\n when(outboundRespo...
{ "fields": [ { "declarator": "outboundResponseFromHubToResponseTransformerFactory", "modifier": "private final", "original_string": "private final OutboundResponseFromHubToResponseTransformerFactory outboundResponseFromHubToResponseTransformerFactory;", "type": "OutboundResponseFromHubToR...
{ "body": "public AuthnResponseFromHubContainerDto generate(ResponseFromHubDto responseFromHub) {\n try{\n return createSuccessResponse(responseFromHub);\n } catch (Exception e) {\n throw new UnableToGenerateSamlException(\"Unable to generate RP authn response\", e, Level.ERROR);\n...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_14
{ "fields": [ { "declarator": "responseTransformer", "modifier": "@Mock\n private", "original_string": "@Mock\n private StringToOpenSamlObjectTransformer<Response> responseTransformer;", "type": "StringToOpenSamlObjectTransformer<Response>", "var_name": "responseTransformer" ...
{ "body": "@Test(expected = SamlTransformationErrorException.class)\n public void generateAuthResponseFromHub_shouldThrowSamlTransformationException() throws MarshallingException, SignatureException {\n SessionId sessionId = SessionId.createNewSessionId();\n String expectedSamlMessageId = UUID.random...
{ "fields": [ { "declarator": "responseTransformer", "modifier": "private final", "original_string": "private final StringToOpenSamlObjectTransformer<Response> responseTransformer;", "type": "StringToOpenSamlObjectTransformer<Response>", "var_name": "responseTransformer" }, {...
{ "body": "public SamlMessage generateAuthnResponseFromHub(SessionId sessionId, String principalIpAddressAsSeenByHub) {\n AuthnResponseFromHubContainerDto authnResponseFromHub = sessionProxy.getAuthnResponseFromHub(sessionId);\n Response samlResponse = responseTransformer.apply(authnResponseFromHub.getS...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_374
{ "fields": [ { "declarator": "PERSISTENT_ID = aPersistentId().withNameId(\"nameId\").build()", "modifier": "private static final", "original_string": "private static final PersistentId PERSISTENT_ID = aPersistentId().withNameId(\"nameId\").build();", "type": "PersistentId", "var_nam...
{ "body": "@Test\n public void logCycle3DataObtained_shouldLogEvent() {\n eventLogger.logCycle3DataObtained(SESSION_ID, TRANSACTION_ENTITY_ID, SESSION_EXPIRY_TIMESTAMP, REQUEST_ID, PRINCIPAL_IP_ADDRESS_SEEN_BY_HUB);\n\n final EventSinkHubEvent expectedEvent = createExpectedEventSinkHubEvent(Map.of(\n...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(HubEventLogger.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(HubEventLogger.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "public void logCycle3DataObtained(SessionId sessionId, String transactionEntityId, DateTime sessionExpiryTimestamp, String requestId, String principalIpAddressAsSeenByHub) {\n Map<EventDetailsKey, String> details = new HashMap<>();\n details.put(principal_ip_address_as_seen_by_hub, principalI...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_231
{ "fields": [ { "declarator": "stringToOpenSamlResponseTransformer", "modifier": "@Mock\n private", "original_string": "@Mock\n private StringToOpenSamlObjectTransformer<Response> stringToOpenSamlResponseTransformer;", "type": "StringToOpenSamlObjectTransformer<Response>", "var...
{ "body": "@Test public void shouldExtractAuthnStatementAssertionDetailsUnsignedAssertions() throws Exception {\n setupUnsigned();\n InboundResponseFromCountry result = service.translate(samlAuthnResponseTranslatorDto);\n assertThat(result.getCountrySignedResponseContainer().isPresent()).isTrue()...
{ "fields": [ { "declarator": "stringToOpenSamlResponseTransformer", "modifier": "private final", "original_string": "private final StringToOpenSamlObjectTransformer<Response> stringToOpenSamlResponseTransformer;", "type": "StringToOpenSamlObjectTransformer<Response>", "var_name": "s...
{ "body": "public InboundResponseFromCountry translate(SamlAuthnResponseTranslatorDto samlResponseDto) {\n Response response = unmarshall(samlResponseDto);\n ValidatedResponse validatedResponse = validateResponse(response);\n List<Assertion> assertions = assertionDecrypter.decryptAssertions(valid...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_548
{ "fields": [ { "declarator": "assertionValidator", "modifier": "@Mock\n private", "original_string": "@Mock\n private IdentityProviderAssertionValidator assertionValidator;", "type": "IdentityProviderAssertionValidator", "var_name": "assertionValidator" }, { "dec...
{ "body": "@Test\n public void validate_shouldNotThrowExceptionIfResponseIsANoMatch() throws Exception {\n String requestId = \"some-request-id\";\n final Response response = aResponse()\n .withStatus(aStatus().withStatusCode(aStatusCode().withValue(StatusCode.RESPONDER).build()).build...
{ "fields": [ { "declarator": "assertionValidator", "modifier": "private", "original_string": "private AssertionValidator assertionValidator;", "type": "AssertionValidator", "var_name": "assertionValidator" }, { "declarator": "hubEntityId", "modifier": "private", ...
{ "body": "public void validate(ValidatedResponse validatedResponse, ValidatedAssertions validatedAssertions) {\n if (!validatedResponse.isSuccess()) return;\n\n for (Assertion assertion : validatedAssertions.getAssertions()) {\n assertionValidator.validate(assertion, validatedResponse.getInR...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_118
{ "fields": [ { "declarator": "matchingServiceHealthChecker", "modifier": "@Mock\n private", "original_string": "@Mock\n private MatchingServiceHealthChecker matchingServiceHealthChecker;", "type": "MatchingServiceHealthChecker", "var_name": "matchingServiceHealthChecker" }...
{ "body": "@Test\n public void handle_shouldReturnSuccessWhenMatchingServiceIsHealthy() throws Exception {\n MatchingServiceConfigEntityDataDto matchingServiceConfigEntityDataDto = MatchingServiceConfigEntityDataDtoBuilder.aMatchingServiceConfigEntityDataDto().build();\n when(matchingServiceConfigPro...
{ "fields": [ { "declarator": "matchingServiceConfigProxy", "modifier": "private final", "original_string": "private final MatchingServiceConfigProxy matchingServiceConfigProxy;", "type": "MatchingServiceConfigProxy", "var_name": "matchingServiceConfigProxy" }, { "decla...
{ "body": "public AggregatedMatchingServicesHealthCheckResult handle() {\n return handle(false);\n }", "class_method_signature": "MatchingServiceHealthCheckHandler.handle()", "constructor": false, "full_signature": "public AggregatedMatchingServicesHealthCheckResult handle()", "identifier": "handle"...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_289
{ "fields": [ { "declarator": "transformer", "modifier": "@Mock\n private", "original_string": "@Mock\n private Function<HubAttributeQueryRequest, Element> transformer;", "type": "Function<HubAttributeQueryRequest, Element>", "var_name": "transformer" }, { "declar...
{ "body": "@Test\n public void handle_shouldReturnDtoWithMatchingServiceEndpointReturnedFromConfig() {\n HubAttributeQueryRequest hubAttributeQueryRequest = aHubAttributeQueryRequest();\n\n URI attributeQueryUri = URI.create(\"/attribute-query-uri\");\n AttributeQueryContainerDto attributeQuer...
{ "fields": [ { "declarator": "attributeQueryRequestTransformer", "modifier": "protected final", "original_string": "protected final Function<T, Element> attributeQueryRequestTransformer;", "type": "Function<T, Element>", "var_name": "attributeQueryRequestTransformer" }, { ...
{ "body": "public AttributeQueryContainerDto createAttributeQueryContainer(final T attributeQueryRequest,\n final URI msaUri,\n final String matchingServiceEntityId,\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_323
{ "fields": [ { "declarator": "samlAuthnResponseTranslatorDtoFactory", "modifier": "@Mock\n private", "original_string": "@Mock\n private SamlAuthnResponseTranslatorDtoFactory samlAuthnResponseTranslatorDtoFactory;", "type": "SamlAuthnResponseTranslatorDtoFactory", "var_name": ...
{ "body": "@Test\n public void shouldOnlyUpdateSessionStateWhenAFraudSuccessfulResponseIsReceived() {\n // Given\n InboundResponseFromIdpDto fraudResponseFromIdp = InboundResponseFromIdpDtoBuilder.fraudResponse(UUID.randomUUID().toString());\n mockOutStubs(REGISTERING, false, fraudResponseFrom...
{ "fields": [ { "declarator": "samlEngineProxy", "modifier": "private final", "original_string": "private final SamlEngineProxy samlEngineProxy;", "type": "SamlEngineProxy", "var_name": "samlEngineProxy" }, { "declarator": "attributeQueryService", "modifier": "pri...
{ "body": "public ResponseAction receiveAuthnResponseFromIdp(SessionId sessionId,\n SamlAuthnResponseContainerDto samlResponseDto) {\n\n IdpSelectedStateController idpSelectedController = (IdpSelectedStateController) sessionRepository.getStateController(sess...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_266
{ "fields": [ { "declarator": "SIGNATURE_RSA_SHA256 = new SignatureRSASHA256()", "modifier": "private static final", "original_string": "private static final SignatureAlgorithm SIGNATURE_RSA_SHA256 = new SignatureRSASHA256();", "type": "SignatureAlgorithm", "var_name": "SIGNATURE_RSA...
{ "body": "@Test\n public void shouldReportUnknownSignatureAlgorithmInSPAuthnRequest() throws Exception {\n AuthnRequestFromRelyingParty authnRequestFromRelyingParty = anAuthnRequestFromRelyingParty()\n .withId(ID)\n .withIssuer(ISSUER_SP)\n .withSignature(signat...
{ "fields": [ { "declarator": "SIGNATURE_AND_DIGEST_ALGORITHMS_MESSAGE =\n \"%s is using %s and %s for signature and digest method algorithms in %s respectively.\"", "modifier": "public static final", "original_string": "public static final String SIGNATURE_AND_DIGEST_ALGORITHMS_MESSA...
{ "body": "public static void probeAuthnRequestForMethodAlgorithm(final AuthnRequestFromRelyingParty authnRequest) {\n if (authnRequest != null) {\n authnRequest.getSignature().ifPresent((signature) ->\n logMethodAlgorithm(Role.SP, signature, AuthnRequest.DEFAULT_ELEMENT_LOCAL_NAME)\n...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_55
{ "fields": [ { "declarator": "levelsOfAssuranceConfigValidator", "modifier": "private", "original_string": "private LevelsOfAssuranceConfigValidator levelsOfAssuranceConfigValidator;", "type": "LevelsOfAssuranceConfigValidator", "var_name": "levelsOfAssuranceConfigValidator" }, ...
{ "body": "@Test(expected = ConfigValidationException.class)\n public void shouldThrowWhenTransactionIsLoa1Only() {\n levelsOfAssuranceConfigValidator.validateAllTransactionsAreLOA1OrLOA2(Set.of(loa1OnlyTransaction));\n }", "class_method_signature": "LevelsOfAssuranceConfigValidatorTest.shouldThrowWhen...
{ "fields": [], "file": "hub/config/src/main/java/uk/gov/ida/hub/config/data/LevelsOfAssuranceConfigValidator.java", "identifier": "LevelsOfAssuranceConfigValidator", "interfaces": "", "methods": [ { "class_method_signature": "LevelsOfAssuranceConfigValidator.validateLevelsOfAssurance(final Set<Iden...
{ "body": "protected void validateAllTransactionsAreLOA1OrLOA2(Set<TransactionConfig> transactionConfig) {\n List<TransactionConfig> badTransactionConfigs = transactionConfig.stream()\n .filter(x -> {\n List<LevelOfAssurance> levelsOfAssurance = x.getLevelsOfAssurance();\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_587
{ "fields": [ { "declarator": "EXPECTED_DESTINATION = \"http://correct.destination.com\"", "modifier": "private static final", "original_string": "private static final String EXPECTED_DESTINATION = \"http://correct.destination.com\";", "type": "String", "var_name": "EXPECTED_DESTINAT...
{ "body": "@Test\n public void validate_shouldBeValidIfPortSpecifiedOnDestinationButNotForSamlProxy() throws Exception {\n validator.validate(\"http://correct.destination.com:999/foo/bar\");\n }", "class_method_signature": "DestinationValidatorTest.validate_shouldBeValidIfPortSpecifiedOnDestinationButN...
{ "fields": [ { "declarator": "expectedUri", "modifier": "private final", "original_string": "private final URI expectedUri;", "type": "URI", "var_name": "expectedUri" } ], "file": "hub-saml/src/main/java/uk/gov/ida/saml/core/validators/DestinationValidator.java", "identifi...
{ "body": "public void validate(String destination) {\n if(destination == null) throw new SamlValidationException(destinationMissing(expectedUri));\n\n URI destinationURI = URI.create(destination);\n\n URI destinationURIWithoutPort;\n destinationURIWithoutPort = uriWithoutPort(destinationU...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_22
{ "fields": [ { "declarator": "SESSION_ID = SessionId.createNewSessionId()", "modifier": "private static final", "original_string": "private static final SessionId SESSION_ID = SessionId.createNewSessionId();", "type": "SessionId", "var_name": "SESSION_ID" }, { "declara...
{ "body": "@Test\n public void shouldAuditWithNoSessionContextIfSessionIdIsNotPresent() {\n final UUID errorId = UUID.randomUUID();\n ApplicationException exception = createUnauditedException(\n ExceptionType.DUPLICATE_SESSION,\n errorId,\n URI.create(\"/s...
{ "fields": [ { "declarator": "eventSinkMessageSender", "modifier": "private final", "original_string": "private final EventSinkMessageSender eventSinkMessageSender;", "type": "EventSinkMessageSender", "var_name": "eventSinkMessageSender" } ], "file": "hub/saml-proxy/src/main...
{ "body": "public boolean auditException(ApplicationException exception, Optional<SessionId> sessionId) {\n boolean isAudited = exception.isAudited();\n\n if (!isAudited && exception.requiresAuditing()) {\n EventDetails eventDetails = new EventDetails(\n downstream_uri,\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_4
{ "fields": [ { "declarator": "relayStateValidator", "modifier": "@Mock\n private", "original_string": "@Mock\n private RelayStateValidator relayStateValidator;", "type": "RelayStateValidator", "var_name": "relayStateValidator" }, { "declarator": "stringSamlAuthnR...
{ "body": "@Test\n public void handleResponsePost_shouldReportPrincipalIpAddress() throws Exception {\n when(stringSamlResponseTransformer.apply(SAML_REQUEST)).thenReturn(aResponse().build());\n when(samlMessageSignatureValidator.validate(any(org.opensaml.saml.saml2.core.Response.class), any(QName.cl...
{ "fields": [ { "declarator": "relayStateValidator", "modifier": "private final", "original_string": "private final RelayStateValidator relayStateValidator;", "type": "RelayStateValidator", "var_name": "relayStateValidator" }, { "declarator": "stringSamlAuthnRequestTran...
{ "body": "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n @Path(Urls.SamlProxyUrls.RESPONSE_POST_PATH)\n @Timed\n @ResponseMetered\n public Response handleResponsePost(SamlRequestDto samlRequestDto) {\n\n final SessionId sessionId = new SessionId(samlR...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_568
{ "fields": [ { "declarator": "attributeQueryAttributeFactory", "modifier": "private", "original_string": "private AttributeQueryAttributeFactory attributeQueryAttributeFactory;", "type": "AttributeQueryAttributeFactory", "var_name": "attributeQueryAttributeFactory" } ], "fil...
{ "body": "@Test\n public void createAttribute_shouldPopulateAttributeNameFormatWithUnspecifiedFormat(){\n UserAccountCreationAttribute userAccountCreationAttribute = UserAccountCreationAttribute.CURRENT_ADDRESS;\n\n Attribute attribute = attributeQueryAttributeFactory.createAttribute(userAccountCrea...
{ "fields": [ { "declarator": "openSamlXmlObjectFactory", "modifier": "private final", "original_string": "private final OpenSamlXmlObjectFactory openSamlXmlObjectFactory;", "type": "OpenSamlXmlObjectFactory", "var_name": "openSamlXmlObjectFactory" } ], "file": "hub-saml/src/...
{ "body": "public Attribute createAttribute(final UserAccountCreationAttribute userAccountCreationAttribute) {\n final Attribute attribute = openSamlXmlObjectFactory.createAttribute();\n attribute.setName(userAccountCreationAttribute.getAttributeName());\n attribute.setNameFormat(Attribute.UNSPEC...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_138
{ "fields": [ { "declarator": "SUPPORTED_MSA_VERSION_NUMBER = \"supported-version\"", "modifier": "private static final", "original_string": "private static final String SUPPORTED_MSA_VERSION_NUMBER = \"supported-version\";", "type": "String", "var_name": "SUPPORTED_MSA_VERSION_NUMBE...
{ "body": "@Test\n public void shouldReturnDefaultVersionIfVersionValueNotDefinedInResponseIdWithOtherFlagsForHealthyMatchingService() {\n MatchingServiceConfigEntityDataDto matchingServiceConfigEntityDataDto =\n aMatchingServiceConfigEntityDataDto().build();\n prepareForHealthyRespons...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(MatchingServiceHealthChecker.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(MatchingServiceHealthChecker.class);", "type": "Logger", "var_name": "L...
{ "body": "public MatchingServiceHealthCheckResult performHealthCheck(final MatchingServiceConfigEntityDataDto configEntity) {\n MatchingServiceHealthCheckerRequestDto matchingServiceHealthCheckerRequestDto =\n new MatchingServiceHealthCheckerRequestDto(configEntity.getTransactionEntityId(), con...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_211
{ "fields": [ { "declarator": "idpSingleSignOnServiceHelper", "modifier": "private", "original_string": "private IdpSingleSignOnServiceHelper idpSingleSignOnServiceHelper;", "type": "IdpSingleSignOnServiceHelper", "var_name": "idpSingleSignOnServiceHelper" }, { "declara...
{ "body": "@Test\n public void shouldReturnSSOUriForIDP() {\n final URI singleSignOn = idpSingleSignOnServiceHelper.getSingleSignOn(idpEntityId);\n assertThat(singleSignOn).isEqualTo(idpSSOUri);\n }", "class_method_signature": "IdpSingleSignOnServiceHelperTest.shouldReturnSSOUriForIDP()", "con...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(IdpSingleSignOnServiceHelper.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(IdpSingleSignOnServiceHelper.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "public URI getSingleSignOn(String entityId) {\n EntityDescriptor idpEntityDescriptor;\n try {\n CriteriaSet criteria = new CriteriaSet(new EntityIdCriterion(entityId));\n idpEntityDescriptor = metadataProvider.resolveSingle(criteria);\n } catch (ResolverException ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_354
{ "fields": [ { "declarator": "eventLogger", "modifier": "@Mock\n private", "original_string": "@Mock\n private HubEventLogger eventLogger;", "type": "HubEventLogger", "var_name": "eventLogger" }, { "declarator": "samlEngineProxy", "modifier": "@Mock\n pr...
{ "body": "@Test\n public void handle_shouldLogToEventSinkAndNotifyPolicyOnRequesterError() {\n final InboundResponseFromMatchingServiceDto inboundResponseFromMatchingServiceDto =\n new InboundResponseFromMatchingServiceDto(MatchingServiceIdaStatus.RequesterError,\n inR...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(MatchingServiceResponseService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(MatchingServiceResponseService.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "public void handleSuccessResponse(SessionId sessionId, SamlResponseDto samlResponse) {\n getSessionIfItExists(sessionId);\n\n SamlResponseContainerDto samlResponseContainer = new SamlResponseContainerDto(\n samlResponse.getSamlResponse(),\n sessionRepository.getRequestIs...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_75
{ "fields": [ { "declarator": "identityProviderConfigOnboardingTransactionValidator", "modifier": "", "original_string": "IdentityProviderConfigOnboardingTransactionValidator identityProviderConfigOnboardingTransactionValidator;", "type": "IdentityProviderConfigOnboardingTransactionValidat...
{ "body": "@Test\n public void validate_shouldNotThrowExceptionWhenOnboardingTransactionEntityIsNotSpecified() {\n IdentityProviderConfig identityProviderConfig = anIdentityProviderConfigData().withoutOnboarding().build();\n identityProviderConfigOnboardingTransactionValidator.validate(identityProvid...
{ "fields": [ { "declarator": "transactionConfigRepository", "modifier": "private", "original_string": "private LocalConfigRepository<TransactionConfig> transactionConfigRepository;", "type": "LocalConfigRepository<TransactionConfig>", "var_name": "transactionConfigRepository" } ...
{ "body": "public void validate(IdentityProviderConfig identityProviderConfig) {\n for (String onboardingTransactionEntityId : identityProviderConfig.getOnboardingTransactionEntityIds()) {\n transactionConfigRepository.getData(onboardingTransactionEntityId)\n .orElseThrow(() -> cr...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_180
{ "fields": [ { "declarator": "SERVICE_INFO = ServiceInfoConfigurationBuilder.aServiceInfo().withName(\"some-service-name\").build()", "modifier": "private static final", "original_string": "private static final ServiceInfoConfiguration SERVICE_INFO = ServiceInfoConfigurationBuilder.aServiceInfo...
{ "body": "@Test\n public void logAuthenticationRequest_shouldPassHubEventToEventSinkProxy() {\n externalCommunicationEventLogger.logIdpAuthnRequest(MESSAGE_ID, SESSION_ID, ENDPOINT_URL, PRINCIPAL_IP_ADDRESS_AS_SEEN_BY_HUB);\n\n final EventSinkHubEvent expectedEvent = new EventSinkHubEvent(\n ...
{ "fields": [ { "declarator": "serviceInfo", "modifier": "private final", "original_string": "private final ServiceInfoConfiguration serviceInfo;", "type": "ServiceInfoConfiguration", "var_name": "serviceInfo" }, { "declarator": "eventSinkProxy", "modifier": "priv...
{ "body": "public void logIdpAuthnRequest(String messageId, SessionId sessionId, URI targetUrl, String principalIpAddressAsSeenByHub) {\n\n Map<EventDetailsKey, String> details = new HashMap<>();\n details.put(principal_ip_address_as_seen_by_hub, principalIpAddressAsSeenByHub);\n\n logExternalCom...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_495
{ "fields": [ { "declarator": "marshaller = new IdpIdaStatusMarshaller(new OpenSamlXmlObjectFactory())", "modifier": "private final", "original_string": "private final IdpIdaStatusMarshaller marshaller = new IdpIdaStatusMarshaller(new OpenSamlXmlObjectFactory());", "type": "IdpIdaStatusMar...
{ "body": "@Test\n public void transform_shouldTransformAuthenticationPending() throws Exception {\n Status transformedStatus = marshaller.toSamlStatus(IdpIdaStatus.authenticationPending());\n StatusValue actual = (StatusValue) transformedStatus.getStatusDetail().getOrderedChildren().get(0);\n\n ...
{ "fields": [ { "declarator": "REST_TO_SAML_CODES = Map.of(\n IdpIdaStatus.success(), DetailedStatusCode.Success,\n IdpIdaStatus.noAuthenticationContext(), DetailedStatusCode.NoAuthenticationContext,\n IdpIdaStatus.authenticationFailed(), DetailedStat...
{ "body": "@Override\n protected Optional<StatusDetail> getStatusDetail(IdpIdaStatus originalStatus) {\n if (REST_TO_STATUS_DETAIL.containsKey(originalStatus)) {\n StatusDetail statusDetail = this.samlObjectFactory.createStatusDetail();\n StatusValue statusValue = this.samlObjectFactor...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_616
{ "fields": [ { "declarator": "relayStateValidator", "modifier": "private", "original_string": "private RelayStateValidator relayStateValidator;", "type": "RelayStateValidator", "var_name": "relayStateValidator" } ], "file": "hub-saml/src/test/java/uk/gov/ida/saml/core/securi...
{ "body": "@Test\n public void validate_shouldCheckRelayStateLengthIsLessThanEightyOneCharactersOrRaiseException() {\n final String aStringMoreThanEightyCharacters = \"a\".repeat(82);\n\n SamlTransformationErrorManagerTestHelper.validateFail(\n () -> relayStateValidator.validate(aStrin...
{ "fields": [ { "declarator": "MAXIMUM_NUMBER_OF_CHARACTERS = 80", "modifier": "private static final", "original_string": "private static final int MAXIMUM_NUMBER_OF_CHARACTERS = 80;", "type": "int", "var_name": "MAXIMUM_NUMBER_OF_CHARACTERS" }, { "declarator": "INVALID...
{ "body": "public void validate(String relayState) {\n if (relayState == null){\n return;\n }\n\n if (relayState.length() > MAXIMUM_NUMBER_OF_CHARACTERS) {\n SamlValidationSpecificationFailure failure = SamlTransformationErrorFactory.invalidRelayState(relayState);\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_246
{ "fields": [ { "declarator": "samlEngineExceptionMapper", "modifier": "", "original_string": "SamlEngineExceptionMapper samlEngineExceptionMapper;", "type": "SamlEngineExceptionMapper", "var_name": "samlEngineExceptionMapper" }, { "declarator": "levelLoggerFactory", ...
{ "body": "@Test\n public void shouldReturnBadRequestForUnrecognizedException() {\n Response response = samlEngineExceptionMapper.toResponse(new RuntimeException(\"error\"));\n\n assertThat(response.getStatus()).isEqualTo(Response.Status.BAD_REQUEST.getStatusCode());\n assertThat(response.hasE...
{ "fields": [ { "declarator": "HAS_NOT_BEEN_AUDITED_YET = false", "modifier": "private static final", "original_string": "private static final boolean HAS_NOT_BEEN_AUDITED_YET = false;", "type": "boolean", "var_name": "HAS_NOT_BEEN_AUDITED_YET" }, { "declarator": "level...
{ "body": "@Override\n public Response toResponse(Exception exception) {\n final UUID errorId = UUID.randomUUID();\n Response.ResponseBuilder response = Response.status(Response.Status.BAD_REQUEST);\n\n // when creating a new exception here we want to create an unaudited application exception ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_303
{ "fields": [ { "declarator": "ANALYTICS_SESSION_ID = \"anAnalyticsSessionId\"", "modifier": "private static final", "original_string": "private static final String ANALYTICS_SESSION_ID = \"anAnalyticsSessionId\";", "type": "String", "var_name": "ANALYTICS_SESSION_ID" }, { ...
{ "body": "@Test\n public void restartsJourney() {\n when(sessionRepository.getStateController(SESSION_ID, RestartJourneyState.class)).thenReturn(restartJourneyStateController);\n\n authnRequestFromTransactionHandler.restartJourney(SESSION_ID);\n\n verify(restartJourneyStateController).transit...
{ "fields": [ { "declarator": "sessionRepository", "modifier": "private final", "original_string": "private final SessionRepository sessionRepository;", "type": "SessionRepository", "var_name": "sessionRepository" }, { "declarator": "hubEventLogger", "modifier": "...
{ "body": "public void restartJourney(final SessionId sessionId) {\n final RestartJourneyStateController stateController =\n (RestartJourneyStateController) sessionRepository.getStateController(sessionId, RestartJourneyState.class);\n stateController.transitionToSessionStartedState();\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_196
{ "fields": [], "file": "hub/saml-soap-proxy/src/test/java/uk/gov/ida/hub/samlsoapproxy/domain/TimeoutEvaluatorTest.java", "identifier": "TimeoutEvaluatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void hasAttributeQueryTimedOut_shouldDoNothingIfRequestIsNotTimedOut() {\n\n DateTimeFreezer.freezeTime();\n AttributeQueryContainerDto queryWithTimeoutInFuture =\n anAttributeQueryContainerDto(anAttributeQuery().build())\n .withAttribut...
{ "fields": [], "file": "hub/saml-soap-proxy/src/main/java/uk/gov/ida/hub/samlsoapproxy/domain/TimeoutEvaluator.java", "identifier": "TimeoutEvaluator", "interfaces": "", "methods": [ { "class_method_signature": "TimeoutEvaluator.hasAttributeQueryTimedOut(AttributeQueryContainerDto queryContainerDto...
{ "body": "public void hasAttributeQueryTimedOut(AttributeQueryContainerDto queryContainerDto) {\n DateTime timeout = queryContainerDto.getAttributeQueryClientTimeOut();\n DateTime timeOfCheck = DateTime.now();\n if(timeout.isBefore(timeOfCheck)){\n Duration duration = new Duration(tim...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_63
{ "fields": [ { "declarator": "MATCHING_SERVICE_ENTITY_ID = \"matching-service-entity-id\"", "modifier": "private static final", "original_string": "private static final String MATCHING_SERVICE_ENTITY_ID = \"matching-service-entity-id\";", "type": "String", "var_name": "MATCHING_SERV...
{ "body": "@Test\n public void start_shouldThrowExceptionWhenDuplicateEntityIdsExist(){\n final String entityId = \"entity-id\";\n final String simpleId = \"simple-id\";\n final String matchingServiceEntityId = \"matching-service-entity-id\";\n final IdentityProviderConfig identityProvi...
{ "fields": [ { "declarator": "identityProviderConfigDataSource", "modifier": "private final", "original_string": "private final ConfigDataSource<IdentityProviderConfig> identityProviderConfigDataSource;", "type": "ConfigDataSource<IdentityProviderConfig>", "var_name": "identityProvi...
{ "body": "@Override\n public void start() {\n cacheConfigData();\n\n checkForDuplicateEntityIds();\n checkEachTransactionHasCorrespondingEntryInMatchingService();\n checkEachOnboardingIdentityProviderHasACorrespondingTransaction();\n checkThereAreNoInvalidCertificates();\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_529
{ "fields": [ { "declarator": "validator", "modifier": "private", "original_string": "private AuthnRequestFromTransactionValidator validator;", "type": "AuthnRequestFromTransactionValidator", "var_name": "validator" } ], "file": "hub-saml/src/test/java/uk/gov/ida/saml/hub/val...
{ "body": "@Test\n public void validateRequest_shouldDoNothingIfRequestIsSigned() throws Exception {\n\n validator.validate(anAuthnRequest().build());\n }", "class_method_signature": "AuthnRequestFromTransactionValidatorTest.validateRequest_shouldDoNothingIfRequestIsSigned()", "constructor": false, ...
{ "fields": [ { "declarator": "issuerValidator", "modifier": "private final", "original_string": "private final IssuerValidator issuerValidator;", "type": "IssuerValidator", "var_name": "issuerValidator" }, { "declarator": "duplicateAuthnRequestValidator", "modifi...
{ "body": "@Override\n public void validate(AuthnRequest request) {\n issuerValidator.validate(request.getIssuer());\n validateRequestId(request);\n validateIssueInstant(request);\n validateSignaturePresence(request);\n validateVersion(request);\n validateNameIdPolicy(requ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_179
{ "fields": [ { "declarator": "SERVICE_INFO = ServiceInfoConfigurationBuilder.aServiceInfo().withName(\"some-service-name\").build()", "modifier": "private static final", "original_string": "private static final ServiceInfoConfiguration SERVICE_INFO = ServiceInfoConfigurationBuilder.aServiceInfo...
{ "body": "@Test\n public void logMatchingServiceRequest_shouldPassHubEventToEventSinkProxyNew() {\n externalCommunicationEventLogger.logMatchingServiceRequest(MESSAGE_ID, SESSION_ID, ENDPOINT_URL);\n\n final EventSinkHubEvent expectedEvent = new EventSinkHubEvent(\n SERVICE_INFO,\n ...
{ "fields": [ { "declarator": "serviceInfo", "modifier": "private final", "original_string": "private final ServiceInfoConfiguration serviceInfo;", "type": "ServiceInfoConfiguration", "var_name": "serviceInfo" }, { "declarator": "eventSinkProxy", "modifier": "priv...
{ "body": "public void logMatchingServiceRequest(String messageId, SessionId sessionId, URI targetUrl) {\n\n logExternalCommunicationEvent(messageId, sessionId, targetUrl, MATCHING_SERVICE_REQUEST, IncludeIpAddressState.WITH_RESOLVED_IP_ADDRESS);\n }", "class_method_signature": "ExternalCommunicationEvent...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_483
{ "fields": [ { "declarator": "assertionStringTransformer", "modifier": "@Mock\n private", "original_string": "@Mock\n private XmlObjectToBase64EncodedStringTransformer<Assertion> assertionStringTransformer;", "type": "XmlObjectToBase64EncodedStringTransformer<Assertion>", "var...
{ "body": "@Test\n public void shouldMapEidasLoACorrectly() {\n final AuthnContextClassRef authnContextClassRef = anAuthnContextClassRef().withAuthnContextClasRefValue(EidasAuthnContext.EIDAS_LOA_SUBSTANTIAL).build();\n Assertion theAssertion = anAssertion()\n .addAuthnStatement(anAuthnSta...
{ "fields": [ { "declarator": "VALID_GPG45_STATUSES = List.of(\"DF01\", \"FI01\", \"IT01\")", "modifier": "private static final", "original_string": "private static final List<String> VALID_GPG45_STATUSES = List.of(\"DF01\", \"FI01\", \"IT01\");", "type": "List<String>", "var_name": ...
{ "body": "public PassthroughAssertion fromAssertion(Assertion assertion) {\n return fromAssertion(assertion, false);\n }", "class_method_signature": "PassthroughAssertionUnmarshaller.fromAssertion(Assertion assertion)", "constructor": false, "full_signature": "public PassthroughAssertion fromAssertio...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_600
{ "fields": [ { "declarator": "RESPONSE_ISSUER_ID = \"issuer ID\"", "modifier": "private static final", "original_string": "private static final String RESPONSE_ISSUER_ID = \"issuer ID\";", "type": "String", "var_name": "RESPONSE_ISSUER_ID" }, { "declarator": "duplicate...
{ "body": "@Test\n public void validate_shouldThrowExceptionWhenAttributeValueIsIncorrectType() throws Exception {\n Attribute attribute = aSimpleStringAttribute().withName(IdaConstants.Attributes_1_1.Firstname.NAME).withSimpleStringValue(\"Joe\").build();\n AttributeStatement attributeStatement = aM...
{ "fields": [ { "declarator": "VALID_ATTRIBUTE_NAMES_1_1 = Set.of(\n IdaConstants.Attributes_1_1.Firstname.NAME,\n IdaConstants.Attributes_1_1.Middlename.NAME,\n IdaConstants.Attributes_1_1.Surname.NAME,\n IdaConstants.Attributes_1_1.Gender.NAME,\n IdaC...
{ "body": "public void validate(Assertion assertion, String responseIssuerId) {\n duplicateAssertionValidator.validateMatchingDataSetAssertion(assertion, responseIssuerId);\n validateAttributes(assertion);\n }", "class_method_signature": "MatchingDatasetAssertionValidator.validate(Assertion asserti...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_315
{ "fields": [ { "declarator": "configProxy", "modifier": "@Mock\n private", "original_string": "@Mock\n private TransactionsConfigProxy configProxy;", "type": "TransactionsConfigProxy", "var_name": "configProxy" }, { "declarator": "sessionRepository", "modif...
{ "body": "@Test(expected = EidasNotSupportedException.class)\n public void shouldReturnErrorWhenGettingCountriesWithTxnNotSupportingEidas() {\n when(sessionRepository.getTransactionSupportsEidas(sessionId)).thenReturn(false);\n\n service.getCountries(sessionId);\n }", "class_method_signature": ...
{ "fields": [ { "declarator": "configProxy", "modifier": "private final", "original_string": "private final TransactionsConfigProxy configProxy;", "type": "TransactionsConfigProxy", "var_name": "configProxy" }, { "declarator": "sessionRepository", "modifier": "pri...
{ "body": "public List<EidasCountryDto> getCountries(SessionId sessionId) {\n ensureTransactionSupportsEidas(sessionId);\n\n List<EidasCountryDto> eidasSupportedCountries = configProxy.getEidasSupportedCountries();\n\n String relyingPartyId = sessionRepository.getRequestIssuerEntityId(sessionId);...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_34
{ "fields": [ { "declarator": "stringtoOpenSamlObjectTransformer", "modifier": "private", "original_string": "private StringToOpenSamlObjectTransformer<Response> stringtoOpenSamlObjectTransformer;", "type": "StringToOpenSamlObjectTransformer<Response>", "var_name": "stringtoOpenSamlO...
{ "body": "@Test\n public void shouldFormatResponseWithNoIssuer() throws MarshallingException, SignatureException {\n Response response = aResponse().withIssuer(null).build();\n\n String logString = new ProtectiveMonitoringLogFormatter().formatAuthnResponse(response, Direction.INBOUND, SignatureStatu...
{ "fields": [ { "declarator": "AUTHN_REQUEST = \"Protective Monitoring – Authn Request Event – {requestId: %s, \" +\n \"direction: %s, destination: %s, issuerId: %s, validSignature: %s}\"", "modifier": "private static final", "original_string": "private static final String AUTHN_REQUE...
{ "body": "public String formatAuthnResponse(Response samlResponse, Direction direction, SignatureStatus signatureStatus) {\n Issuer issuer = samlResponse.getIssuer();\n String issuerString = issuer != null ? issuer.getValue() : \"\";\n\n Status status = samlResponse.getStatus();\n StatusC...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_591
{ "fields": [ { "declarator": "RESPONSE_ISSUER_ID = \"issuer ID\"", "modifier": "private static final", "original_string": "private static final String RESPONSE_ISSUER_ID = \"issuer ID\";", "type": "String", "var_name": "RESPONSE_ISSUER_ID" }, { "declarator": "duplicate...
{ "body": "@Test\n public void validate_shouldNotThrowAnExceptionWhenSurNameIsPresent_ProfileV1_1() throws Exception {\n AttributeStatement attributeStatement = anEmptyMatchingDatasetAttributeStatement_1_1().withSurname(aPersonName_1_1().buildAsSurname()).build();\n Assertion matchingDatasetAssertion...
{ "fields": [ { "declarator": "VALID_ATTRIBUTE_NAMES_1_1 = Set.of(\n IdaConstants.Attributes_1_1.Firstname.NAME,\n IdaConstants.Attributes_1_1.Middlename.NAME,\n IdaConstants.Attributes_1_1.Surname.NAME,\n IdaConstants.Attributes_1_1.Gender.NAME,\n IdaC...
{ "body": "public void validate(Assertion assertion, String responseIssuerId) {\n duplicateAssertionValidator.validateMatchingDataSetAssertion(assertion, responseIssuerId);\n validateAttributes(assertion);\n }", "class_method_signature": "MatchingDatasetAssertionValidator.validate(Assertion asserti...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_207
{ "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 validationSucceedsWhenIssuerMatches() {\n when(responseIssuer.getFormat()).thenReturn(\"issuerFormat\");\n when(assertionIssuer.getFormat()).thenReturn(\"issuerFormat\");\n when(responseIssuer.getValue()).thenReturn(\"issuerValue\");\n when(assertionIssuer...
{ "fields": [], "file": "hub/saml-engine/src/main/java/uk/gov/ida/hub/samlengine/validation/country/EidasAuthnResponseIssuerValidator.java", "identifier": "EidasAuthnResponseIssuerValidator", "interfaces": "", "methods": [ { "class_method_signature": "EidasAuthnResponseIssuerValidator.validate(Valid...
{ "body": "public void validate(ValidatedResponse validatedResponse, Assertion validatedIdentityAssertion) {\n if ( !Objects.equals(validatedResponse.getIssuer().getFormat(), validatedIdentityAssertion.getIssuer().getFormat()) ) {\n throw EidasProfileValidationSpecification.authnResponseAssertionIss...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_342
{ "fields": [ { "declarator": "authnRequestHandler", "modifier": "@Mock\n private", "original_string": "@Mock\n private AuthnRequestFromTransactionHandler authnRequestHandler;", "type": "AuthnRequestFromTransactionHandler", "var_name": "authnRequestHandler" }, { "...
{ "body": "@Test\n public void shouldCreateSessionIfProvidedAssertionConsumerServiceUrlMatches() {\n URI assertionConsumerServiceUri = UriBuilder.fromUri(UUID.randomUUID().toString()).build();\n SamlResponseWithAuthnRequestInformationDto samlResponse = aSamlResponseWithAuthnRequestInformationDto()\n ...
{ "fields": [ { "declarator": "samlEngineProxy", "modifier": "private final", "original_string": "private final SamlEngineProxy samlEngineProxy;", "type": "SamlEngineProxy", "var_name": "samlEngineProxy" }, { "declarator": "configProxy", "modifier": "private final...
{ "body": "public SessionId create(final SamlAuthnRequestContainerDto requestDto) {\n SamlResponseWithAuthnRequestInformationDto samlResponse = samlEngineProxy.translate(requestDto.getSamlRequest());\n URI assertionConsumerServiceUri = getAssertionConsumerServiceUri(samlResponse);\n boolean trans...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_155
{ "fields": [ { "declarator": "HUB_ROLE = SPSSODescriptor.DEFAULT_ELEMENT_NAME", "modifier": "private static final", "original_string": "private static final QName HUB_ROLE = SPSSODescriptor.DEFAULT_ELEMENT_NAME;", "type": "QName", "var_name": "HUB_ROLE" }, { "declarato...
{ "body": "@Test\n public void run_shouldUseCorrectSignatureValidators() throws Exception {\n when(attributeQueryRequestClient.sendQuery(any(Element.class), anyString(), any(SessionId.class), any(URI.class))).thenReturn(matchingServiceResponse);\n final Response response = aResponse().build();\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ExecuteAttributeQueryRequest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ExecuteAttributeQueryRequest.class);", "type": "Logger", "var_name": "L...
{ "body": "public Element execute(SessionId sessionId, AttributeQueryContainerDto attributeQueryContainerDto) {\n\n LOG.info(\"Validating attribute query {}\", attributeQueryContainerDto.getId());\n Element matchingServiceRequest = convertToElementAndValidate(attributeQueryContainerDto);\n\n LOG....
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_505
{ "fields": [ { "declarator": "ENCRYPTED_IDENTITY_ASSERTION = \"encrypted-identity-assertion!\"", "modifier": "public static final", "original_string": "public static final String ENCRYPTED_IDENTITY_ASSERTION = \"encrypted-identity-assertion!\";", "type": "String", "var_name": "ENCRY...
{ "body": "@Test\n public void shouldSetTheSPNameQualifierAndNameQualifierToValuesThatShouldntBeThereButCurrentlyHaveNoWhereBetterToBe() {\n final HubAssertion cycle3DataAssertion = aHubAssertion().build();\n\n HubEidasAttributeQueryRequest hubEidasAttributeQueryRequest = aHubEidasAttributeQueryReque...
{ "fields": [ { "declarator": "samlObjectFactory", "modifier": "private final", "original_string": "private final OpenSamlXmlObjectFactory samlObjectFactory;", "type": "OpenSamlXmlObjectFactory", "var_name": "samlObjectFactory" }, { "declarator": "hubAssertionMarshaller...
{ "body": "public AttributeQuery apply(HubEidasAttributeQueryRequest originalQuery) {\n AttributeQuery transformedQuery = samlObjectFactory.createAttributeQuery();\n\n Issuer issuer = samlObjectFactory.createIssuer(originalQuery.getIssuer());\n\n transformedQuery.setID(originalQuery.getId());\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_440
{ "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 shouldCreateAEidasSuccessfulMatchStateController() {\n StateController controller = stateControllerFactory.build(anEidasSuccessfulMatchState().build(), stateTransitionAction);\n\n assertThat(controller).isInstanceOf(EidasSuccessfulMatchStateController.class);\n }", ...
{ "fields": [ { "declarator": "injector", "modifier": "private final", "original_string": "private final Injector injector;", "type": "Injector", "var_name": "injector" } ], "file": "hub/policy/src/main/java/uk/gov/ida/hub/policy/domain/controller/StateControllerFactory.java"...
{ "body": "public <T extends State> StateController build(final T state, final StateTransitionAction stateTransitionAction) {\n PolicyState policyState = PolicyState.fromStateClass(state.getClass());\n switch (policyState) {\n\n case SESSION_STARTED:\n return new SessionStarted...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_293
{ "fields": [ { "declarator": "outboundResponseFromHubToResponseTransformerFactory", "modifier": "private", "original_string": "private OutboundResponseFromHubToResponseTransformerFactory outboundResponseFromHubToResponseTransformerFactory;", "type": "OutboundResponseFromHubToResponseTrans...
{ "body": "@Test\n public void getShouldReturnOutboundSamlProfileResponseFromHubToStringFunctionSHA256WhenHubShouldSignResponseMessages() {\n\n when(transactionsConfigProxy.getShouldHubSignResponseMessages(ENTITY_ID)).thenReturn(true);\n when(transactionsConfigProxy.getShouldHubUseLegacySamlStandard(...
{ "fields": [ { "declarator": "outboundLegacyResponseFromHubToStringFunctionSHA256", "modifier": "private final", "original_string": "private final OutboundLegacyResponseFromHubToStringFunctionSHA256 outboundLegacyResponseFromHubToStringFunctionSHA256;", "type": "OutboundLegacyResponseFrom...
{ "body": "public Function<OutboundResponseFromHub, String> get(String authnRequestIssuerEntityId) {\n if (transactionsConfigProxy.getShouldHubSignResponseMessages(authnRequestIssuerEntityId)) {\n return transactionsConfigProxy.getShouldHubUseLegacySamlStandard(authnRequestIssuerEntityId) ?\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_339
{ "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 shouldProcessCancellationAfterReceivingCancelCycle3DataInputForEidasFlow() {\n SessionId eidasSessionId = SessionIdBuilder.aSessionId().build();\n when(sessionRepository.getStateController(eidasSessionId, AbstractAwaitingCycle3DataState.class)).thenReturn(eidasAwaitingC...
{ "fields": [ { "declarator": "sessionRepository", "modifier": "private final", "original_string": "private final SessionRepository sessionRepository;", "type": "SessionRepository", "var_name": "sessionRepository" }, { "declarator": "attributeQueryService", "modif...
{ "body": "public void cancelCycle3DataInput(SessionId sessionId) {\n AbstractAwaitingCycle3DataStateController controller = (AbstractAwaitingCycle3DataStateController) sessionRepository.getStateController(sessionId, AbstractAwaitingCycle3DataState.class);\n controller.handleCancellation();\n }", "...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_552
{ "fields": [ { "declarator": "assertionValidator", "modifier": "@Mock\n private", "original_string": "@Mock\n private IdentityProviderAssertionValidator assertionValidator;", "type": "IdentityProviderAssertionValidator", "var_name": "assertionValidator" }, { "dec...
{ "body": "@Test\n public void validate_shouldDelegateToIpAddressValidator() throws Exception {\n Assertion authnStatementAssertion = anAssertion().addAuthnStatement(anAuthnStatement().build()).buildUnencrypted();\n Response response = aResponse()\n .addEncryptedAssertion(anAssertion()...
{ "fields": [ { "declarator": "identityProviderAssertionValidator", "modifier": "private final", "original_string": "private final IdentityProviderAssertionValidator identityProviderAssertionValidator;", "type": "IdentityProviderAssertionValidator", "var_name": "identityProviderAsser...
{ "body": "public void validate(ValidatedResponse validatedResponse, ValidatedAssertions validatedAssertions) {\n validatedAssertions.getAssertions().forEach(\n assertion -> identityProviderAssertionValidator.validate(assertion, validatedResponse.getInResponseTo(), hubEntityId)\n );\n\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_102
{ "fields": [ { "declarator": "trustStoreForCertProvider", "modifier": "@Mock\n private", "original_string": "@Mock\n private TrustStoreForCertificateProvider trustStoreForCertProvider;", "type": "TrustStoreForCertificateProvider", "var_name": "trustStoreForCertProvider" },...
{ "body": "@Test\n public void validateReturnsNoResultForLocalCertWithEmptyX509() {\n Certificate certificateWithoutX509 = new Certificate(\"entityId\", FederationEntityType.RP, \"\", CertificateUse.SIGNING, CertificateOrigin.FEDERATION, true);\n Optional<CertificateValidity> result = certificateVali...
{ "fields": [ { "declarator": "trustStoreForCertificateProvider", "modifier": "private final", "original_string": "private final TrustStoreForCertificateProvider trustStoreForCertificateProvider;", "type": "TrustStoreForCertificateProvider", "var_name": "trustStoreForCertificateProvi...
{ "body": "public Optional<CertificateValidity> validate(Certificate certificate) {\n return certificate.getX509Certificate()\n .map(x509 -> getCertificateValidity(certificate, x509));\n }", "class_method_signature": "CertificateValidityChecker.validate(Certificate certificate)", "constru...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_417
{ "fields": [ { "declarator": "stateTransitionAction", "modifier": "@Mock\n private", "original_string": "@Mock\n private StateTransitionAction stateTransitionAction;", "type": "StateTransitionAction", "var_name": "stateTransitionAction" }, { "declarator": "transa...
{ "body": "@Test\n public void shouldReturnEidasUserAccountCreationRequestSentStateForNoMatchWhenAttributesArePresent() {\n ArgumentCaptor<EidasUserAccountCreationRequestSentState> capturedState = ArgumentCaptor.forClass(EidasUserAccountCreationRequestSentState.class);\n ArgumentCaptor<EventSinkHubEv...
{ "fields": [], "file": "hub/policy/src/main/java/uk/gov/ida/hub/policy/domain/controller/EidasCycle3MatchRequestSentStateController.java", "identifier": "EidasCycle3MatchRequestSentStateController", "interfaces": "", "methods": [ { "class_method_signature": "EidasCycle3MatchRequestSentStateControll...
{ "body": "@Override\n protected void transitionToNextStateForNoMatchResponse() {\n List<UserAccountCreationAttribute> userAccountCreationAttributes = transactionsConfigProxy.getUserAccountCreationAttributes(state.getRequestIssuerEntityId());\n if (!userAccountCreationAttributes.isEmpty()) {\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_18
{ "fields": [ { "declarator": "servletRequest", "modifier": "@Mock\n private", "original_string": "@Mock\n private HttpServletRequest servletRequest;", "type": "HttpServletRequest", "var_name": "servletRequest" }, { "declarator": "mapper", "modifier": "priva...
{ "body": "@Test\n public void shouldReturnResponseStatusOfNotFoundWhenANotFoundExceptionIsThrown() {\n Response response = mapper.toResponse(new NotFoundException());\n\n assertThat(response.getStatus()).isEqualTo(Response.Status.NOT_FOUND.getStatusCode());\n }", "class_method_signature": "Abst...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AbstractContextExceptionMapper.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AbstractContextExceptionMapper.class);", "type": "Logger", "var_name"...
{ "body": "@Override\n public final Response toResponse(TException exception) {\n if (exception instanceof NotFoundException) {\n return Response.status(Response.Status.NOT_FOUND).build();\n } else if (noSessionIdInQueryString() && inARequestWhereWeExpectContext()) {\n LOG.error...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_381
{ "fields": [ { "declarator": "SESSION_ID = new SessionId(\"sessionId\")", "modifier": "private static final", "original_string": "private static final SessionId SESSION_ID = new SessionId(\"sessionId\");", "type": "SessionId", "var_name": "SESSION_ID" }, { "declarator"...
{ "body": "@Test\n public void getResponseProcessingStatus() {\n assertThat(responseProcessingDetails.getResponseProcessingStatus()).isEqualTo(ResponseProcessingStatus.GET_C3_DATA);\n }", "class_method_signature": "ResponseProcessingDetailsTest.getResponseProcessingStatus()", "constructor": false, ...
{ "fields": [ { "declarator": "sessionId", "modifier": "private", "original_string": "private SessionId sessionId;", "type": "SessionId", "var_name": "sessionId" }, { "declarator": "responseProcessingStatus", "modifier": "private", "original_string": "privat...
{ "body": "public ResponseProcessingStatus getResponseProcessingStatus() {\n return responseProcessingStatus;\n }", "class_method_signature": "ResponseProcessingDetails.getResponseProcessingStatus()", "constructor": false, "full_signature": "public ResponseProcessingStatus getResponseProcessingStatus(...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_114
{ "fields": [ { "declarator": "dataBuilder = anIdentityProviderConfigData()", "modifier": "private final", "original_string": "private final IdentityProviderConfigDataBuilder dataBuilder = anIdentityProviderConfigData();", "type": "IdentityProviderConfigDataBuilder", "var_name": "dat...
{ "body": "@Test\n public void shouldCheckThatIsOnboardingAtLoa() {\n final IdentityProviderConfig data = dataBuilder\n .withSupportedLevelsOfAssurance(Arrays.asList(LevelOfAssurance.LEVEL_1, LevelOfAssurance.LEVEL_2))\n .withOnboardingLevels(Collections.singletonList(LevelOfAs...
{ "fields": [ { "declarator": "onboardingTransactionEntityIds = emptyList()", "modifier": "@Valid\n @JsonProperty\n protected", "original_string": "@Valid\n @JsonProperty\n protected List<String> onboardingTransactionEntityIds = emptyList();", "type": "List<String>", "var...
{ "body": "public boolean isOnboardingAtLoa(LevelOfAssurance levelOfAssurance) {\n return onboardingLevelsOfAssurance.contains(levelOfAssurance);\n }", "class_method_signature": "IdentityProviderConfig.isOnboardingAtLoa(LevelOfAssurance levelOfAssurance)", "constructor": false, "full_signature": "publ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_544
{ "fields": [ { "declarator": "happyStatus", "modifier": "private", "original_string": "private Status happyStatus;", "type": "Status", "var_name": "happyStatus" }, { "declarator": "validator", "modifier": "private", "original_string": "private EncryptedResp...
{ "body": "@Test\n public void validate_shouldDoNothingIfAResponderStatusContainsASubStatusOfNoMatch() throws Exception {\n Status status = createStatus(StatusCode.RESPONDER, createSubStatusCode(SamlStatusCode.NO_MATCH));\n Response response = aResponse().withStatus(status).withNoDefaultAssertion().b...
{ "fields": [], "file": "hub-saml/src/main/java/uk/gov/ida/saml/hub/validators/response/matchingservice/EncryptedResponseFromMatchingServiceValidator.java", "identifier": "EncryptedResponseFromMatchingServiceValidator", "interfaces": "", "methods": [ { "class_method_signature": "EncryptedResponseFro...
{ "body": "public void validate(Response response) {\n IssuerValidator.validate(response);\n RequestIdValidator.validate(response);\n validateResponse(response);\n }", "class_method_signature": "EncryptedResponseFromMatchingServiceValidator.validate(Response response)", "constructor": fals...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_401
{ "fields": [ { "declarator": "IDP_ENTITY_ID = \"some-idp-issuer-id\"", "modifier": "private static final", "original_string": "private static final String IDP_ENTITY_ID = \"some-idp-issuer-id\";", "type": "String", "var_name": "IDP_ENTITY_ID" }, { "declarator": "TRANSA...
{ "body": "@Test\n public void shouldReturnMatchingServiceEntityIdWhenAsked() {\n controller.getMatchingServiceEntityId();\n verify(transactionsConfigProxy).getMatchingServiceEntityId(idpSelectedState.getRequestIssuerEntityId());\n }", "class_method_signature": "IdpSelectedStateControllerTest.sho...
{ "fields": [ { "declarator": "state", "modifier": "private final", "original_string": "private final IdpSelectedState state;", "type": "IdpSelectedState", "var_name": "state" }, { "declarator": "hubEventLogger", "modifier": "private final", "original_string...
{ "body": "public String getMatchingServiceEntityId() {\n return transactionsConfigProxy.getMatchingServiceEntityId(state.getRequestIssuerEntityId());\n }", "class_method_signature": "IdpSelectedStateController.getMatchingServiceEntityId()", "constructor": false, "full_signature": "public String getMa...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_378
{ "fields": [ { "declarator": "PERSISTENT_ID = aPersistentId().withNameId(\"nameId\").build()", "modifier": "private static final", "original_string": "private static final PersistentId PERSISTENT_ID = aPersistentId().withNameId(\"nameId\").build();", "type": "PersistentId", "var_nam...
{ "body": "@Test\n public void shouldLogErrorEventContainingDownstreamUri() {\n final String downstreamUri = \"uri\";\n\n eventLogger.logErrorEvent(ERROR_ID, SESSION_ID, ERROR_MESSAGE, downstreamUri);\n\n final EventSinkHubEvent expectedEvent = new EventSinkHubEvent(\n SERVICE_INFO,...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(HubEventLogger.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(HubEventLogger.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "public void logErrorEvent(final UUID errorId, final SessionId sessionId, final String errorMessage) {\n final Map<EventDetailsKey, String> details = Map.of(\n message, errorMessage,\n error_id, errorId.toString());\n logErrorEvent(details, sessionId);\n }", "class_m...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_397
{ "fields": [ { "declarator": "eventSinkProxy", "modifier": "@Mock\n private", "original_string": "@Mock\n private EventSinkProxy eventSinkProxy;", "type": "EventSinkProxy", "var_name": "eventSinkProxy" }, { "declarator": "stateTransitionAction", "modifier":...
{ "body": "@Test\n public void shouldMoveFromAwaitingC3StateToCycle3DataSentStateWhenCycle3DataIsReceived() {\n final SessionId sessionId = SessionId.createNewSessionId();\n AwaitingCycle3DataState state = anAwaitingCycle3DataState().withSessionId(sessionId).build();\n AwaitingCycle3DataStateC...
{ "fields": [], "file": "hub/policy/src/main/java/uk/gov/ida/hub/policy/domain/controller/AwaitingCycle3DataStateController.java", "identifier": "AwaitingCycle3DataStateController", "interfaces": "implements StateController, ResponseProcessingStateController, ErrorResponsePreparedStateController", "methods": ...
{ "body": "@Override\n public void handleCycle3DataSubmitted(final String principalIpAddressAsSeenByHub) {\n getHubEventLogger().logCycle3DataObtained(\n getState().getSessionId(),\n getState().getRequestIssuerEntityId(),\n getState().getSessionExpiryTimestamp(),\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_513
{ "fields": [ { "declarator": "marshaller", "modifier": "private", "original_string": "private HubAssertionMarshaller marshaller;", "type": "HubAssertionMarshaller", "var_name": "marshaller" }, { "declarator": "attributeFactory = null", "modifier": "@Mock\n pri...
{ "body": "@Test\n public void transform_shouldTransformLevelOfCycle3DataAssertion() throws Exception {\n String attributeName = \"someName\";\n String value = \"some value\";\n HubAssertion assertion = aHubAssertion().withCycle3Data(aCycle3Dataset().addCycle3Data(attributeName, value).build()...
{ "fields": [ { "declarator": "openSamlXmlObjectFactory", "modifier": "private final", "original_string": "private final OpenSamlXmlObjectFactory openSamlXmlObjectFactory;", "type": "OpenSamlXmlObjectFactory", "var_name": "openSamlXmlObjectFactory" }, { "declarator": "a...
{ "body": "public Assertion toSaml(HubAssertion hubAssertion) {\n\n Assertion transformedAssertion = openSamlXmlObjectFactory.createAssertion();\n transformedAssertion.setIssueInstant(hubAssertion.getIssueInstant());\n Issuer transformedIssuer = openSamlXmlObjectFactory.createIssuer(hubAssertion....
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_143
{ "fields": [ { "declarator": "SUPPORTED_MSA_VERSION_NUMBER = \"supported-version\"", "modifier": "private static final", "original_string": "private static final String SUPPORTED_MSA_VERSION_NUMBER = \"supported-version\";", "type": "String", "var_name": "SUPPORTED_MSA_VERSION_NUMBE...
{ "body": "@Test\n public void shouldReturnFailureWithMessageForUnhealthyMatchingService() {\n MatchingServiceConfigEntityDataDto matchingServiceConfigEntityDataDto =\n aMatchingServiceConfigEntityDataDto().build();\n prepareForResponse(matchingServiceConfigEntityDataDto, RequesterErro...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(MatchingServiceHealthChecker.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(MatchingServiceHealthChecker.class);", "type": "Logger", "var_name": "L...
{ "body": "public MatchingServiceHealthCheckResult performHealthCheck(final MatchingServiceConfigEntityDataDto configEntity) {\n MatchingServiceHealthCheckerRequestDto matchingServiceHealthCheckerRequestDto =\n new MatchingServiceHealthCheckerRequestDto(configEntity.getTransactionEntityId(), con...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_456
{ "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 shouldCreateAnEidasUserAccountCreationFailedStateController() {\n StateController controller = stateControllerFactory.build(aEidasUserAccountCreationFailedState().build(), stateTransitionAction);\n\n assertThat(controller).isInstanceOf(EidasUserAccountCreationFailedStat...
{ "fields": [ { "declarator": "injector", "modifier": "private final", "original_string": "private final Injector injector;", "type": "Injector", "var_name": "injector" } ], "file": "hub/policy/src/main/java/uk/gov/ida/hub/policy/domain/controller/StateControllerFactory.java"...
{ "body": "public <T extends State> StateController build(final T state, final StateTransitionAction stateTransitionAction) {\n PolicyState policyState = PolicyState.fromStateClass(state.getClass());\n switch (policyState) {\n\n case SESSION_STARTED:\n return new SessionStarted...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_59
{ "fields": [ { "declarator": "levelsOfAssuranceConfigValidator", "modifier": "private", "original_string": "private LevelsOfAssuranceConfigValidator levelsOfAssuranceConfigValidator;", "type": "LevelsOfAssuranceConfigValidator", "var_name": "levelsOfAssuranceConfigValidator" }, ...
{ "body": "@Test\n public void shouldNotThrowWhenAnIdpsIsOnboardingAndDoesNotSupportATransaction() {\n Set<TransactionConfig> transactionsConfig = Set.of(loa1And2Transaction);\n\n final IdentityProviderConfig onboardingIdp = IdentityProviderConfigDataBuilder.anIdentityProviderConfigData()\n ...
{ "fields": [], "file": "hub/config/src/main/java/uk/gov/ida/hub/config/data/LevelsOfAssuranceConfigValidator.java", "identifier": "LevelsOfAssuranceConfigValidator", "interfaces": "", "methods": [ { "class_method_signature": "LevelsOfAssuranceConfigValidator.validateLevelsOfAssurance(final Set<Iden...
{ "body": "protected void validateAllTransactionsAreSupportedByIDPs(Set<IdentityProviderConfig> identityProviderConfig, Set<TransactionConfig> transactionConfig) {\n Map<TransactionConfig, List<IdentityProviderConfig>> unsupportedTransaction = transactionConfig.stream()\n .collect(Collectors.toM...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }
113597154_285
{ "fields": [ { "declarator": "transformer", "modifier": "@Mock\n private", "original_string": "@Mock\n private Function<HubAttributeQueryRequest, Element> transformer;", "type": "Function<HubAttributeQueryRequest, Element>", "var_name": "transformer" }, { "declar...
{ "body": "@Test\n public void handle_shouldSetEntityToEncryptFor() {\n HubAttributeQueryRequest hubAttributeQueryRequest = aHubAttributeQueryRequest();\n when(transformer.apply(any(HubAttributeQueryRequest.class))).thenThrow(new RuntimeException(\"Avoid NullPointerException later.\"));\n\n tr...
{ "fields": [ { "declarator": "attributeQueryRequestTransformer", "modifier": "protected final", "original_string": "protected final Function<T, Element> attributeQueryRequestTransformer;", "type": "Function<T, Element>", "var_name": "attributeQueryRequestTransformer" }, { ...
{ "body": "public AttributeQueryContainerDto createAttributeQueryContainer(final T attributeQueryRequest,\n final URI msaUri,\n final String matchingServiceEntityId,\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "MIT License", "repo_id": 113597154, "size": 4224, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/alphagov/verify-hub" }