/** * Constructor to create the context with the address of the authority. * * @param authority * URL of the authenticating authority * @param validateAuthority * flag to enable/disable authority validation. * @param service * ExecutorService to be used to execute the requests. Developer * is responsible for maintaining the lifetime of the * ExecutorService. * @throws MalformedURLException * thrown if URL is invalid */ public AuthenticationContext(final String authority, final boolean validateAuthority, final ExecutorService service) throws MalformedURLException { if (StringHelper.isBlank(authority)) { throw new IllegalArgumentException("authority is null or empty"); } if (service == null) { throw new IllegalArgumentException("service is null"); } this.service = service; this.validateAuthority = validateAuthority; this.authority = this.canonicalizeUri(authority); authenticationAuthority = new AuthenticationAuthority(new URL( this.getAuthority()), this.shouldValidateAuthority()); }
/** * Constructor to create the context with the address of the authority. * * @param authority * URL of the authenticating authority * @param validateAuthority * flag to enable/disable authority validation. * @param service * ExecutorService to be used to execute the requests. Developer * is responsible for maintaining the lifetime of the * ExecutorService. * @throws MalformedURLException * thrown if URL is invalid */ public AuthenticationContext(final String authority, final boolean validateAuthority, final ExecutorService service) throws MalformedURLException { if (StringHelper.isBlank(authority)) { throw new IllegalArgumentException("authority is null or empty"); } if (service == null) { throw new IllegalArgumentException("service is null"); } this.service = service; this.validateAuthority = validateAuthority; this.authority = this.canonicalizeUri(authority); authenticationAuthority = new AuthenticationAuthority(new URL( this.getAuthority()), this.shouldValidateAuthority()); }
/** * Constructor to create the context with the address of the authority. * * @param authority * URL of the authenticating authority * @param validateAuthority * flag to enable/disable authority validation. * @param service * ExecutorService to be used to execute the requests. Developer * is responsible for maintaining the lifetime of the * ExecutorService. * @throws MalformedURLException * thrown if URL is invalid */ public AuthenticationContext(final String authority, final boolean validateAuthority, final ExecutorService service) throws MalformedURLException { if (StringHelper.isBlank(authority)) { throw new IllegalArgumentException("authority is null or empty"); } if (service == null) { throw new IllegalArgumentException("service is null"); } this.service = service; this.validateAuthority = validateAuthority; this.authority = this.canonicalizeUri(authority); authenticationAuthority = new AuthenticationAuthority(new URL( this.getAuthority()), this.shouldValidateAuthority()); }