@Test public void testAltsAuthContext() { AltsAuthContext authContext = new AltsAuthContext(handshakerResult); assertEquals(TEST_APPLICATION_PROTOCOL, authContext.getApplicationProtocol()); assertEquals(TEST_RECORD_PROTOCOL, authContext.getRecordProtocol()); assertEquals(TEST_SECURITY_LEVEL, authContext.getSecurityLevel()); assertEquals(TEST_PEER_SERVICE_ACCOUNT, authContext.getPeerServiceAccount()); assertEquals(TEST_LOCAL_SERVICE_ACCOUNT, authContext.getLocalServiceAccount()); assertEquals(rpcVersions, authContext.getPeerRpcVersions()); }
public AltsAuthContext(HandshakerResult result) { context = AltsContext.newBuilder() .setApplicationProtocol(result.getApplicationProtocol()) .setRecordProtocol(result.getRecordProtocol()) .setSecurityLevel(SecurityLevel.INTEGRITY_AND_PRIVACY) .setPeerServiceAccount(result.getPeerIdentity().getServiceAccount()) .setLocalServiceAccount(result.getLocalIdentity().getServiceAccount()) .setPeerRpcVersions(result.getPeerRpcVersions()) .build(); }
AltsAuthContext { public AltsAuthContext(HandshakerResult result) { context = AltsContext.newBuilder() .setApplicationProtocol(result.getApplicationProtocol()) .setRecordProtocol(result.getRecordProtocol()) .setSecurityLevel(SecurityLevel.INTEGRITY_AND_PRIVACY) .setPeerServiceAccount(result.getPeerIdentity().getServiceAccount()) .setLocalServiceAccount(result.getLocalIdentity().getServiceAccount()) .setPeerRpcVersions(result.getPeerRpcVersions()) .build(); } }
AltsAuthContext { public AltsAuthContext(HandshakerResult result) { context = AltsContext.newBuilder() .setApplicationProtocol(result.getApplicationProtocol()) .setRecordProtocol(result.getRecordProtocol()) .setSecurityLevel(SecurityLevel.INTEGRITY_AND_PRIVACY) .setPeerServiceAccount(result.getPeerIdentity().getServiceAccount()) .setLocalServiceAccount(result.getLocalIdentity().getServiceAccount()) .setPeerRpcVersions(result.getPeerRpcVersions()) .build(); } AltsAuthContext(HandshakerResult result); }
AltsAuthContext { public AltsAuthContext(HandshakerResult result) { context = AltsContext.newBuilder() .setApplicationProtocol(result.getApplicationProtocol()) .setRecordProtocol(result.getRecordProtocol()) .setSecurityLevel(SecurityLevel.INTEGRITY_AND_PRIVACY) .setPeerServiceAccount(result.getPeerIdentity().getServiceAccount()) .setLocalServiceAccount(result.getLocalIdentity().getServiceAccount()) .setPeerRpcVersions(result.getPeerRpcVersions()) .build(); } AltsAuthContext(HandshakerResult result); @VisibleForTesting static AltsAuthContext getDefaultInstance(); String getApplicationProtocol(); String getRecordProtocol(); SecurityLevel getSecurityLevel(); String getPeerServiceAccount(); String getLocalServiceAccount(); RpcProtocolVersions getPeerRpcVersions(); }
AltsAuthContext { public AltsAuthContext(HandshakerResult result) { context = AltsContext.newBuilder() .setApplicationProtocol(result.getApplicationProtocol()) .setRecordProtocol(result.getRecordProtocol()) .setSecurityLevel(SecurityLevel.INTEGRITY_AND_PRIVACY) .setPeerServiceAccount(result.getPeerIdentity().getServiceAccount()) .setLocalServiceAccount(result.getLocalIdentity().getServiceAccount()) .setPeerRpcVersions(result.getPeerRpcVersions()) .build(); } AltsAuthContext(HandshakerResult result); @VisibleForTesting static AltsAuthContext getDefaultInstance(); String getApplicationProtocol(); String getRecordProtocol(); SecurityLevel getSecurityLevel(); String getPeerServiceAccount(); String getLocalServiceAccount(); RpcProtocolVersions getPeerRpcVersions();  }