private AttributeType getNameAT() { AttributeType nameAt = new AttributeType(CLIENT_NAME, new StringAttributeSyntax(), msg); nameAt.setFlags(AttributeType.TYPE_IMMUTABLE_FLAG); nameAt.setMinElements(1); nameAt.setMaxElements(1); nameAt.setUniqueValues(false); nameAt.setVisibility(AttributeVisibility.local); return nameAt; }
private AttributeType getAllowedURIsAT() { AttributeType authorizationAt = new AttributeType(ALLOWED_RETURN_URI, new StringAttributeSyntax(), msg); authorizationAt.setFlags(AttributeType.TYPE_IMMUTABLE_FLAG); authorizationAt.setMinElements(1); authorizationAt.setMaxElements(5); authorizationAt.setUniqueValues(false); authorizationAt.setVisibility(AttributeVisibility.local); return authorizationAt; }
private AttributeType getAllowedGrantFlowsAT() { Set<String> allowed = new HashSet<>(); for (GrantFlow gf : GrantFlow.values()) allowed.add(gf.toString()); AttributeType allowedGrantsAt = new AttributeType(ALLOWED_FLOWS, new EnumAttributeSyntax(allowed), msg); allowedGrantsAt.setFlags(AttributeType.TYPE_IMMUTABLE_FLAG); allowedGrantsAt.setMinElements(1); allowedGrantsAt.setMaxElements(5); allowedGrantsAt.setUniqueValues(true); allowedGrantsAt.setVisibility(AttributeVisibility.local); return allowedGrantsAt; }
private AttributeType getLogoAT() { JpegImageAttributeSyntax syntax = new JpegImageAttributeSyntax(); try { syntax.setMaxHeight(200); syntax.setMaxWidth(400); syntax.setMaxSize(4000000); } catch (WrongArgumentException e) { throw new IllegalArgumentException(e); } AttributeType logoAt = new AttributeType(CLIENT_LOGO, syntax, msg); logoAt.setFlags(AttributeType.TYPE_IMMUTABLE_FLAG); logoAt.setMinElements(1); logoAt.setMaxElements(1); logoAt.setUniqueValues(false); logoAt.setVisibility(AttributeVisibility.local); return logoAt; }