/** * Obtain the Login URL. * @return URL for login */ private URL lookupLoginURL() { return this.registryClient .getServiceURL(this.groupManagementServiceURI, Standards.UMS_LOGIN_01, AuthMethod.ANON); }
protected URL getServiceURL(URI serviceID, URI standard, AuthMethod authMethod) { RegistryClient registryClient = new RegistryClient(); return registryClient.getServiceURL(serviceID, standard, authMethod); }
private URL getJobListURL() { AuthMethod am = AuthMethod.ANON; if (subject != null) { am = AuthenticationUtil.getAuthMethodFromCredentials(subject); } RegistryClient rc = new RegistryClient(); URL ret = rc.getServiceURL(resourceID, standardID, am, interfaceType); if (ret == null) { throw new RuntimeException("init FAIL, service not found:" + resourceID + " " + standardID + " " + am + " " + interfaceType); } log.info("jobListURL: " + ret); return ret; }
final URL resolverURL = registryClient.getServiceURL( URI.create("ivo://cadc.nrc.ca/resolver"), Standards.RESOLVER_10, AuthMethod.ANON);
public AdSchemeHandler() { try { RegistryClient rc = new RegistryClient(); AuthMethod am = AuthenticationUtil.getAuthMethod(AuthenticationUtil.getCurrentSubject()); if (am == null) { am = AuthMethod.ANON; } URL serviceURL = rc.getServiceURL(URI.create(DATA_URI), Standards.DATA_10, am); this.baseURL = serviceURL.toExternalForm(); } catch (Throwable t) { log.error("failed to find CADC data service URL", t); throw new RuntimeException("BUG: failed to find CADC data service URL", t); } log.debug("CADC data service URL: " + baseURL); }
private URL lookupServiceURL(final URI standard) throws AccessControlException { Subject subject = AuthenticationUtil.getCurrentSubject(); AuthMethod am = AuthenticationUtil.getAuthMethodFromCredentials(subject); URL serviceURL = getRegistryClient().getServiceURL(this.serviceID, standard, am); if (serviceURL == null) { throw new RuntimeException( String.format("Unable to get Service URL for '%s', '%s', '%s'", serviceID.toString(), standard, am)); } return serviceURL; }
public static CheckResource getAvailabilityCheck() { RegistryClient regClient = new RegistryClient(); LocalAuthority localAuth = new LocalAuthority(); URI serviceURI = localAuth.getServiceURI(Standards.UMS_USERS_01.toASCIIString()); URL availURL = regClient.getServiceURL(serviceURI, Standards.VOSI_AVAILABILITY, AuthMethod.ANON); return new CheckWebService(availURL.toExternalForm()); } }
/** * The returned CheckResource is the same as the one from AuthenticatorImpl. * * @return the CheckResource */ public static CheckResource getAvailabilityCheck() { RegistryClient regClient = new RegistryClient(); LocalAuthority localAuth = new LocalAuthority(); URI serviceURI = localAuth.getServiceURI(Standards.UMS_USERS_01.toASCIIString()); URL availURL = regClient.getServiceURL(serviceURI, Standards.VOSI_AVAILABILITY, AuthMethod.ANON); return new CheckWebService(availURL.toExternalForm()); } }
.getServiceURL(this.serviceID, Standards.CRED_DELEGATE_10, AuthMethod.CERT); URL resourceURL = new URL(credUrl.toExternalForm() + "/" + resourcePath.toString());
@Override public URL toURL(URI uri) { if (!SCHEME.equals(uri.getScheme())) { throw new IllegalArgumentException("invalid scheme in " + uri); } try { String path = getPath(uri); // check if authMethod has been set AuthMethod am = this.authMethod; if (am == null) { am = AuthenticationUtil.getAuthMethod(AuthenticationUtil.getCurrentSubject()); } if (am == null) { am = AuthMethod.ANON; } RegistryClient rc = new RegistryClient(); URL serviceURL = rc.getServiceURL(new URI(DATA_URI), Standards.DATA_10, am); URL url = this.toURL(serviceURL, path); log.debug(uri + " --> " + url); return url; } catch (MalformedURLException ex) { throw new RuntimeException("BUG", ex); } catch (URISyntaxException bug) { throw new RuntimeException("BUG - failed to create data web service URI", bug); } }
URL tempUrl = rc.getServiceURL(resourceIdentifier, standardID, AuthMethod.ANON); if (tempUrl == null)
URL baseURL = registryClient.getServiceURL(getServiceURI(vuri), Standards.VOSPACE_SYNC_21, am);
/** * Lookup the Service URL for the given standard. The current AuthMethod * will be taken into account. * * @param standard The URI standard to look up. * @return URL for the service. * @throws AccessControlException If the URL cannot be found for the * provided AuthMethod. */ private URL lookupServiceURL(final URI standard) throws AccessControlException { Subject subject = AuthenticationUtil.getCurrentSubject(); AuthMethod am = AuthenticationUtil.getAuthMethodFromCredentials(subject); if (am == null || am.equals(AuthMethod.ANON)) { throw new AccessControlException("Anonymous access not supported."); } URL serviceURL = getRegistryClient().getServiceURL(this.serviceID, standard, am); if (serviceURL == null) { throw new RuntimeException( String.format("Unable to get Service URL for '%s', '%s', '%s'", serviceID.toString(), standard, am)); } return serviceURL; }
.getServiceURL(this.serviceID, Standards.UMS_USERS_01, AuthMethod.CERT); URL getUserURL = new URL(usersURL.toExternalForm() + path);
am = AuthMethod.ANON; URL serviceURL = regClient.getServiceURL(resourceID, Standards.DATALINK_LINKS_10, am); if (serviceURL == null) { return new FailIterator(uri, "failed to resolve URI: cannot find DataLink service " + resourceID);
URL serviceUrl = regClient.getServiceURL( resourceID, Standards.VOSPACE_NODES_20, AuthMethod.COOKIE); serviceUrl = regClient.getServiceURL( resourceID, Standards.VOSPACE_NODES_20, AuthMethod.PASSWORD); url = new URL(serviceUrl.toExternalForm() + sb.toString());
.getServiceURL(this.serviceID, Standards.UMS_USERS_01, am);
.getServiceURL(this.serviceID, Standards.UMS_USERS_01, am); URL getUserURL = new URL(usersURL.toExternalForm() + path); log.debug("getUser request to " + getUserURL.toString());
.getServiceURL(this.serviceID, Standards.UMS_WHOAMI_01, am); if (whoAmIURL == null)
.getServiceURL(this.serviceID, Standards.UMS_USERS_01, am); final List<User> webUsers = new ArrayList<User>(); HttpDownload httpDownload =