@Test public void matches() throws Exception { ClientApp app1 = clientApp(accountCitizen("dev1"), "myapp"); ClientApp app2 = clientApp(accountCitizen("dev1"), "myapp2"); GrantCode code = new GrantCode(UUID.randomUUID(), app1.getClientId(), app1.getClientSecret(), "redirect: EnumSet.of(ClientAppScope.ARTICLE)); assertTrue(code.matches(app1, "redirect: assertFalse(code.matches(app1, "redirect: assertFalse(code.matches(app2, "redirect: }
public boolean matches(ClientApp clientApp, String targetRedirectUri) { return redirectUri.equals(targetRedirectUri) && clientId.equals(clientApp.getClientId()) && clientSecret.equals(clientApp.getClientSecret()); }
GrantCode { public boolean matches(ClientApp clientApp, String targetRedirectUri) { return redirectUri.equals(targetRedirectUri) && clientId.equals(clientApp.getClientId()) && clientSecret.equals(clientApp.getClientSecret()); } }
GrantCode { public boolean matches(ClientApp clientApp, String targetRedirectUri) { return redirectUri.equals(targetRedirectUri) && clientId.equals(clientApp.getClientId()) && clientSecret.equals(clientApp.getClientSecret()); } GrantCode(UUID accountId,
      String clientId,
      String clientSecret,
      String redirectUri,
      Set<ClientAppScope> scopes); }
GrantCode { public boolean matches(ClientApp clientApp, String targetRedirectUri) { return redirectUri.equals(targetRedirectUri) && clientId.equals(clientApp.getClientId()) && clientSecret.equals(clientApp.getClientSecret()); } GrantCode(UUID accountId,
      String clientId,
      String clientSecret,
      String redirectUri,
      Set<ClientAppScope> scopes); static Optional<GrantCode> tryDecode(String rawToken, OauthSecret secret); UUID getAccountId(); String encode(Instant expireTime, OauthSecret secret); @Override boolean equals(Object o); @Override int hashCode(); boolean matches(ClientApp clientApp, String targetRedirectUri); Set<ClientAppScope> getScopes(); }
GrantCode { public boolean matches(ClientApp clientApp, String targetRedirectUri) { return redirectUri.equals(targetRedirectUri) && clientId.equals(clientApp.getClientId()) && clientSecret.equals(clientApp.getClientSecret()); } GrantCode(UUID accountId,
      String clientId,
      String clientSecret,
      String redirectUri,
      Set<ClientAppScope> scopes); static Optional<GrantCode> tryDecode(String rawToken, OauthSecret secret); UUID getAccountId(); String encode(Instant expireTime, OauthSecret secret); @Override boolean equals(Object o); @Override int hashCode(); boolean matches(ClientApp clientApp, String targetRedirectUri); Set<ClientAppScope> getScopes();  }