Invoked by iPojo.
@param enableAuthentication the enableAuthentication to set
168124
public void setEnableAuthentication( boolean enableAuthentication ) {

		this.logger.fine( "Authentication is now " + (enableAuthentication ? "enabled" : "disabled") + ". Updating the REST resource." );
		this.enableAuthentication = enableAuthentication;

		if( this.authenticationFilter != null )
			this.authenticationFilter.setAuthenticationEnabled( enableAuthentication );
	}
1337058
public EnableDomainResponse enableDomain(EnableDomainRequest request) {
        checkNotNull(request, "The parameter request should NOT be null.");
        InternalRequest internalRequest = createRequest(request, HttpMethodName.POST, DOMAIN, request.getDomain());
        internalRequest.addParameter("enable", "");
        return invokeHttpClient(internalRequest, EnableDomainResponse.class);
    }
282322
@VisibleForTesting
  void setAuthenticationHeaders(Object soapClient, Map<String, Object> headerElements,
      AdWordsSession adWordsSession) throws AuthenticationException {
    authorizationHeaderHandler.setAuthorization(soapClient, adWordsSession);
  }
192468
private void configureAuthentication(String username, String password, String realm) {

        // If the username is set, set up authentication:
        if (StringUtils.isNotBlank(username)) {

            this.username = username;
            this.password = password;
            this.realm = StringUtils.defaultIfBlank(realm, "restolino");

            authenticationEnabled = true;
        }
    }
1127084
@Override
	public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
			throws IOException, ServletException {
		String requestURI = request.getRequestURI();
		UserAuthentication userAuth = null;
		User user = null;

		if (requestURI.endsWith(PASSWORD_ACTION)) {
			user = new User();
			user.setIdentifier(request.getParameter(EMAIL));
			user.setPassword(request.getParameter(PASSWORD));
			String appid = request.getParameter(Config._APPID);
			if (!App.isRoot(appid)) {
				App app = Para.getDAO().read(App.id(appid));
				if (app != null) {
					user.setAppid(app.getAppIdentifier());
				}
			}
			if (User.passwordMatches(user) && StringUtils.contains(user.getIdentifier(), "@")) {
				//success!
				user = User.readUserForIdentifier(user);
				userAuth = new UserAuthentication(new AuthenticatedUserDetails(user));
			}
		}
		return SecurityUtils.checkIfActive(userAuth, user, true);
	}
1296440
public void setAuthorized(boolean authorized) {
		boolean wasAuthorized = isAuthorized();
		if (hasChanged(wasAuthorized, authorized)) {
			this.authorized = authorized;
			firePropertyChange(AUTHORIZED_PROPERTY, wasAuthorized, authorized);
			updatedEnabledState();
		}
	}
1098068
public void setAuthToken(String authToken){
        if (authToken != null && authToken.length() != AUTH_TOKEN_LENGTH){            
            throw new IllegalArgumentException(authToken+" is not "+AUTH_TOKEN_LENGTH+" characters long.");
        }
        setParameter(AUTH_TOKEN, authToken);
    }
446334
public void setAuthMethod(String method)
    {
        if (isStarted() && _authMethod!=null && !_authMethod.equals(method))
            throw new IllegalStateException("Handler started");
        _authMethod = method;
    }
332278
@PostConstruct
	public void configure() {
		if (identityProvider.isUnsatisfied()) {
			setIdentityProvider(new EJBContextIdentityProvider(context));
		} else {
			setIdentityProvider(identityProvider.get());
		}
	}
803749
@PostConstruct
    public void configure() {
        if (identityProvider.isUnsatisfied()) {
            setIdentityProvider(new EJBContextIdentityProvider(context));
        } else {
            setIdentityProvider(identityProvider.get());
        }
        if (!userGroupCallback.isUnsatisfied()) {
            setUserGroupCallback(userGroupCallback.get());
        }
        super.init();
    }
549447
public void setEnabled(boolean enabled) {
		super.setEnabled(enabled);

		if (dayChooser != null) {
			dayChooser.setEnabled(enabled);
			monthChooser.setEnabled(enabled);
			yearChooser.setEnabled(enabled);
		}
	}
843624
public void startAuthActivity(Context context, Bundle extras) {
        if (!startDelegateActivity(context, delegate.getAuthStartIntent(), extras)) {
            startActivity(context, extras, AuthActivity.class);
        }
    }
716042
public boolean setAuthenticationMethod(int methodId, Authentication method) {
		if (methodId < 0 || methodId > 255)
			return false;
		if (method == null) {
			// Want to remove a particular method
			return (authMethods.remove(new Integer(methodId)) != null);
		} else {// Add the method, or rewrite old one
			authMethods.put(new Integer(methodId), method);
		}
		return true;
	}
667232
public void enableKerberosAuthentication(final String loginContextEntryKey) {
       try {
           LoginContext lc = new LoginContext(loginContextEntryKey);
           lc.login();
           m_subject = lc.getSubject();
       } catch (SecurityException | LoginException ex) {
           throw new IllegalArgumentException("Cannot determine client consumer's credentials", ex);
       }
    }
407025
static void setAuthParams(String appKey, String desiredUid,
                              String[] alreadyAuthedUids, String webHost, String apiType) {
        setAuthParams(appKey, desiredUid, alreadyAuthedUids, null, null, null);
    }
977155
public void setAuthorized( boolean authorized ) {

        if( isAuthorized() != authorized ) {

            this.authorized = authorized;

            // We need to apply a change to our enabled state depending on our
            // new authorized state.
            if( authorized ) {
                // install the last requested enabled state
                setEnabled(maskedEnabledState);
            } else {
                // Record the current enabled state and then disable
                maskedEnabledState = isEnabled();
                internalSetEnabled(false);
            }
        }
    }
523265
public void setAuthorization(TopicAuthorization authorization)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(tc, "setAuthorization","authorization: "+authorization);

    this.authorization = authorization;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "setAuthorization");
  }