@Test public void extractAAGUID_with_fido2_test() { AAGUID aaguid = new AAGUID(UUID.randomUUID()); MetadataStatement metadataStatement = mock(MetadataStatement.class); when(metadataStatement.getProtocolFamily()).thenReturn("fido2"); when(metadataStatement.getAaguid()).thenReturn(aaguid); assertThat(target.extractAAGUID(metadataStatement)).isEqualTo(aaguid); }
AAGUID extractAAGUID(MetadataStatement metadataStatement) { switch (metadataStatement.getProtocolFamily()) { case "fido2": return metadataStatement.getAaguid(); case "u2f": return AAGUID.ZERO; case "uaf": default: return AAGUID.NULL; } }
JsonFileResourceMetadataStatementsProvider implements MetadataStatementsProvider, InitializingBean { AAGUID extractAAGUID(MetadataStatement metadataStatement) { switch (metadataStatement.getProtocolFamily()) { case "fido2": return metadataStatement.getAaguid(); case "u2f": return AAGUID.ZERO; case "uaf": default: return AAGUID.NULL; } } }
JsonFileResourceMetadataStatementsProvider implements MetadataStatementsProvider, InitializingBean { AAGUID extractAAGUID(MetadataStatement metadataStatement) { switch (metadataStatement.getProtocolFamily()) { case "fido2": return metadataStatement.getAaguid(); case "u2f": return AAGUID.ZERO; case "uaf": default: return AAGUID.NULL; } } JsonFileResourceMetadataStatementsProvider(ObjectConverter objectConverter); }
JsonFileResourceMetadataStatementsProvider implements MetadataStatementsProvider, InitializingBean { AAGUID extractAAGUID(MetadataStatement metadataStatement) { switch (metadataStatement.getProtocolFamily()) { case "fido2": return metadataStatement.getAaguid(); case "u2f": return AAGUID.ZERO; case "uaf": default: return AAGUID.NULL; } } JsonFileResourceMetadataStatementsProvider(ObjectConverter objectConverter); @Override void afterPropertiesSet(); @Override Map<AAGUID, Set<MetadataStatement>> provide(); List<Resource> getResources(); void setResources(List<Resource> resources); }
JsonFileResourceMetadataStatementsProvider implements MetadataStatementsProvider, InitializingBean { AAGUID extractAAGUID(MetadataStatement metadataStatement) { switch (metadataStatement.getProtocolFamily()) { case "fido2": return metadataStatement.getAaguid(); case "u2f": return AAGUID.ZERO; case "uaf": default: return AAGUID.NULL; } } JsonFileResourceMetadataStatementsProvider(ObjectConverter objectConverter); @Override void afterPropertiesSet(); @Override Map<AAGUID, Set<MetadataStatement>> provide(); List<Resource> getResources(); void setResources(List<Resource> resources);  }