public void setVersion(String version) throws ParserException { checkMutable(); IGTFInfo.this.version = new Version(version); }
/** * Checks whether KpwdPrincipal is flagged as disabled. */ @Override public void account(Set<Principal> authorizedPrincipals) throws AuthenticationException { KpwdPrincipal kpwd = getFirst(filter(authorizedPrincipals, KpwdPrincipal.class), null); checkAuthentication(kpwd == null || !kpwd.isDisabled, "account disabled"); }
public void setCAUrl(String url) throws ParserException { checkMutable(); try { IGTFInfo.this.caUrl = new URI(url); } catch (URISyntaxException e) { throw new ParserException(e); } }
public static X509Certificate getEndEntityCertificate(CertPath credential) { X509Certificate[] chain = getX509Certificates(credential); return ProxyUtils.getEndUserCertificate(chain); } }
private String checkValidQuotedDn(String value) throws ParserException { checkMutable(); checkValid(value.startsWith("\""), "value does not start with '\"'"); checkValid(value.endsWith("\""), "value does not end with '\"'"); checkValid(value.length() > 2, "missing quoted content"); return value.substring(1, value.length()-1); }
public void setAlias(String alias) { checkMutable(); IGTFInfo.this.alias = alias; }
public static void checkValid(boolean isOK, String message) throws ParserException { if (!isOK) { throw new ParserException(message); } } }
public GridMapFile(File file) { _file = file; refresh(); }
public X509Plugin(Properties properties) { String path = properties.getProperty("gplazma.x509.igtf-info.path"); infoDirectory = path == null ? null : new IGTFInfoDirectory(path); }
public GridMapFilePlugin(Properties properties) { String path = properties.getProperty(GRIDMAP); checkArgument(path != null, "Undefined property: " + GRIDMAP); _gridMapFile = new GridMapFile(path); }
private Set<Principal> identifyPrincipalsFromCA(X500Principal ca) { return infoDirectory == null ? Collections.emptySet() : infoDirectory.getPrincipals(asGlobusPrincipal(ca)); }
private static Set<Object> getSessionAttributesFromLoginReply(LoginReply loginReply) throws AuthenticationException { Set<Object> attributes = loginReply.getSessionAttributes(); checkAuthentication(attributes != null, "attributes is null"); return attributes; }
public void setPolicyUrl(String url) throws ParserException { checkMutable(); try { IGTFInfo.this.policyUrl = new URI(url); } catch (URISyntaxException e) { throw new ParserException(e); } }
public void setFilename(String name) { checkMutable(); if (name.startsWith("policy-")) { name = name.substring(7); } if (name.endsWith(".info")) { name = name.substring(0, name.length()-5); } IGTFInfo.this.name = name; }
public void setEmail(String address) throws ParserException { checkMutable(); try { IGTFInfo.this.email = new URI("mailto:" + address); } catch (URISyntaxException e) { throw new ParserException(e); } }
public void setUrl(String url) throws ParserException { checkMutable(); try { IGTFInfo.this.url = new URI(url); } catch (URISyntaxException e) { throw new ParserException(e); } }
public void setStatus(String status) throws ParserException { checkMutable(); IGTFInfo.this.status = TO_STATUS.get(status); if (IGTFInfo.this.status == null) { throw new ParserException("Unknown value '" + status + "'"); } }
public void setCRLUrl(String urlList) throws ParserException { checkMutable(); try { ImmutableList.Builder<URI> urls = ImmutableList.builder(); for (String url : Splitter.on(';').trimResults().split(urlList)) { urls.add(new URI(url)); } IGTFInfo.this.crlUrl = urls.build(); } catch (URISyntaxException e) { throw new ParserException(e); } }