mirror of
https://github.com/google/nomulus.git
synced 2025-07-01 16:53:35 +02:00
Fix new checkstyle violations (#1626)
* Fix new checkstyle violations * Restore naming in javadocs
This commit is contained in:
parent
60b80121d0
commit
d0ebbde9ad
2 changed files with 8 additions and 8 deletions
|
@ -42,17 +42,17 @@ import java.io.IOException;
|
|||
*/
|
||||
final class ForwardingServerReceiver implements VerificationCodeReceiver {
|
||||
|
||||
private final int forwarding_port;
|
||||
private final int forwardingPort;
|
||||
private final LocalServerReceiver localServerReceiver = new LocalServerReceiver();
|
||||
|
||||
ForwardingServerReceiver(int forwarding_port) {
|
||||
this.forwarding_port = forwarding_port;
|
||||
ForwardingServerReceiver(int forwardingPort) {
|
||||
this.forwardingPort = forwardingPort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRedirectUri() throws IOException {
|
||||
String redirect_uri = localServerReceiver.getRedirectUri();
|
||||
return redirect_uri.replace("localhost:" + getRemotePort(), "localhost:" + forwarding_port);
|
||||
String redirectUri = localServerReceiver.getRedirectUri();
|
||||
return redirectUri.replace("localhost:" + getRemotePort(), "localhost:" + forwardingPort);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,18 +43,18 @@ final class LoginCommand implements Command {
|
|||
public void run() throws Exception {
|
||||
AuthorizationCodeInstalledApp app;
|
||||
if (port != 0) {
|
||||
String remote_host = InetAddress.getLocalHost().getHostName();
|
||||
String remoteHost = InetAddress.getLocalHost().getHostName();
|
||||
ForwardingServerReceiver forwardingServerReceiver = new ForwardingServerReceiver(port);
|
||||
app =
|
||||
new AuthorizationCodeInstalledApp(
|
||||
flow,
|
||||
forwardingServerReceiver,
|
||||
url -> {
|
||||
int remote_port = forwardingServerReceiver.getRemotePort();
|
||||
int remotePort = forwardingServerReceiver.getRemotePort();
|
||||
System.out.printf(
|
||||
"Please first run the following command in a separate terminal on your local "
|
||||
+ "host:\n\n ssh -L %s:localhost:%s %s\n\n",
|
||||
port, remote_port, remote_host);
|
||||
port, remotePort, remoteHost);
|
||||
System.out.printf(
|
||||
"Please then open the following URL in your local browser and follow the"
|
||||
+ " instructions:\n\n %s\n\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue