public Credentials retrieve(String endpointId) { Credentials credentials = this.credentialsMap.get(endpointId); if (credentials == null) { // Remap endpoint allow an endpoint to share another endpoint credentials // @see ConnectorService.getConnectorSession() EndpointDescriptor desc = this.remote.getEndpointDescriptor(endpointId); if (desc == null) { throw new IllegalArgumentException("Unknown endpoint ID: " + endpointId); } String remapId = desc.getParentId(); if (remapId != null) { credentials = this.credentialsMap.get(remapId); } } return credentials; }
public Credentials retrieve(String endpointId) { Credentials credentials = this.credentialsMap.get(endpointId); if (credentials == null) { // Remap endpoint allow an endpoint to share another endpoint credentials // @see ConnectorService.getConnectorSession() EndpointDescriptor desc = this.remote.getEndpointDescriptor(endpointId); if (desc == null) { throw new IllegalArgumentException("Unknown endpoint ID: " + endpointId); } String remapId = desc.getParentId(); if (remapId != null) { credentials = this.credentialsMap.get(remapId); } } return credentials; }
/** * Removes the ConnectorSession from the HttpSession for the given endpoint * * @param session the session * @param endpointId the endpoint id */ public void removeConnectorSession(HttpSession session, String endpointId) { if (session == null) { throw new IllegalArgumentException("HttpSession cannot be null."); } // Remap connector to use existing credential id connector session endpoint // to allow an endpoint to share another endpoint credentials and connector session // @see SimpleCredentialVault.retrieve() EndpointDescriptor desc = this.remoteConfig.getEndpointDescriptor(endpointId); if (desc.getParentId() != null) { endpointId = desc.getParentId(); } String key = getSessionEndpointKey(endpointId); session.removeAttribute(key); }
if (desc.getParentId() != null) endpointId = desc.getParentId();
if (desc.getParentId() != null) endpointId = desc.getParentId();
/** * Removes the ConnectorSession from the HttpSession for the given endpoint * * @param session the session * @param endpointId the endpoint id */ public void removeConnectorSession(HttpSession session, String endpointId) { if (session == null) { throw new IllegalArgumentException("HttpSession cannot be null."); } // Remap connector to use existing credential id connector session endpoint // to allow an endpoint to share another endpoint credentials and connector session // @see SimpleCredentialVault.retrieve() EndpointDescriptor desc = getRemoteConfig().getEndpointDescriptor(endpointId); if (desc.getParentId() != null) { endpointId = desc.getParentId(); } String key = getSessionEndpointKey(endpointId); session.removeAttribute(key); }