use of com.google.gerrit.server.account.AccountSshKey in project gerrit by GerritCodeReview.
the class VersionedAuthorizedKeysOnInit method addKey.
public AccountSshKey addKey(String pub) {
checkState(keys != null, "SSH keys not loaded yet");
int seq = keys.isEmpty() ? 1 : keys.size() + 1;
AccountSshKey key = new VersionedAuthorizedKeys.SimpleSshKeyCreator().create(accountId, seq, pub);
keys.add(Optional.of(key));
return key;
}
Aggregations