--- MobileAuthentication Impl ---
163869
public DropboxClient authenticate(String email, String password) {
        OAuthRequest request = new OAuthRequest(Verb.GET, DropboxApi.MOBILE_AUTH_URL);
        request.addQuerystringParameter("email", email);
        request.addQuerystringParameter("password", password);
        service.signRequest(requestToken, request);

        accessToken = Json.parse(request.send().getBody(), DropboxAccessToken.class).toOauthToken();

        return buildDropboxClient();
    }
229790
def detectTizen(self):
        
        return UAgentInfo.deviceTizen in self.__userAgent \
            and UAgentInfo.mobile in self.__userAgent
367852
@Override
    public synchronized void authenticate() throws PortalSecurityException {
        if (this.remoteUser != null) {
            // Set the UID for the principal
            this.myPrincipal.setUID(this.remoteUser);

            // Check that the principal UID matches the remote user
            final String newUid = this.myPrincipal.getUID();

            if (this.remoteUser.equals(newUid)) {
                if (log.isInfoEnabled()) {
                    log.info("Authentication REMOTE_USER(" + this.remoteUser + ").");
                }

                this.isauth = true;
            } else if (log.isInfoEnabled()) {
                log.info(
                        "Authentication failed. REMOTE_USER("
                                + this.remoteUser
                                + ") != user("
                                + newUid
                                + ").");
            }
        } else if (log.isInfoEnabled()) {
            log.info(
                    "Authentication failed. REMOTE_USER not set for("
                            + this.myPrincipal.getUID()
                            + ").");
        }

        super.authenticate();
        return;
    }
597542
function setMobile (registrationId, mobileNumber, callback) {
  var json = {}
  json['mobile'] = mobileNumber

  var url = HOST_NAME_SSL + DEVICE_PATH + '/' + registrationId
  return _request(this, url, JSON.stringify(json), 'POST', callback)
}
666650
protected boolean startAuthentication(final C context, final List<Client> currentClients) {
        return isNotEmpty(currentClients) && currentClients.get(0) instanceof IndirectClient;
    }
409236
@Override
    protected void onUnsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException {
        super.onUnsuccessfulAuthentication(request, response, failed);
        LOGGER.log(Level.FINE, "Login attempt failed", failed);
        Authentication auth = failed.getAuthentication();
        if (auth != null) {
            SecurityListener.fireFailedToLogIn(auth.getName());
        }
    }
258987
function getAuthenticationObject () {
    const authString = url.parse(parts[0]).auth;

    if (authString) {
      return {
        source: getName(),
        user: authString.split(':')[0],
        pass: authString.split(':')[1]
      };
    } else {
      return {};
    }
  }
694010
function Authenticator() {
  this._key = 'passport';
  this._strategies = {};
  this._serializers = [];
  this._deserializers = [];
  this._infoTransformers = [];
  this._framework = null;
  this._userProperty = 'user';
  
  this.init();
}
94549
private void scheduleAuthentication(final int appId, final String bridgeId,
      final CallStatsHttp2Client httpClient) {
    scheduler.schedule(new Runnable() {
      public void run() {
        sendAsyncAuthenticationRequest(appId, bridgeId, httpClient);
      }
    }, authenticationRetryTimeout, TimeUnit.MILLISECONDS);
  }
313182
def locationUpdatingAccept(MobileId_presence=0,
                           FollowOnProceed_presence=0,
                           CtsPermission_presence=0):
    """"""
    a = TpPd(pd=0x5)
    b = MessageType(mesType=0x02)  # 00000010
    c = LocalAreaId()
    packet = a / b / c
    if MobileId_presence is 1:
        d = MobileIdHdr(ieiMI=0x17, eightBitMI=0x0)
        packet = packet / d
    if FollowOnProceed_presence is 1:
        e = FollowOnProceed(ieiFOP=0xA1)
        packet = packet / e
    if CtsPermission_presence is 1:
        f = CtsPermissionHdr(ieiCP=0xA2, eightBitCP=0x0)
        packet = packet / f
    return packet
194048
@NotNull
    @Deprecated
    @ObjectiveCName("requestStartAuthCommandWithPhone:")
    public Command<AuthState> requestStartPhoneAuth(final long phone) {
        return modules.getAuthModule().requestStartPhoneAuth(phone);
    }
743826
protected void verifyAuthenticationContextSignature(final MessageContext ctx,
                                                        final HttpServletRequest request,
                                                        final RequestAbstractType authnRequest,
                                                        final SamlRegisteredServiceServiceProviderMetadataFacade adaptor) throws Exception {
        if (!SAMLBindingSupport.isMessageSigned(ctx)) {
            LOGGER.debug("The authentication context is not signed");
            if (adaptor.isAuthnRequestsSigned()) {
                LOGGER.error("Metadata for [{}] says authentication requests are signed, yet authentication request is not", adaptor.getEntityId());
                throw new SAMLException("AuthN request is not signed but should be");
            }
            LOGGER.debug("Authentication request is not signed, so there is no need to verify its signature.");
        } else {
            LOGGER.debug("The authentication context is signed; Proceeding to validate signatures...");
            samlProfileHandlerConfigurationContext.getSamlObjectSignatureValidator().verifySamlProfileRequestIfNeeded(authnRequest, adaptor, request, ctx);
        }
    }
569368
async function setMobile (registrationId, mobileNumber) {
  var json = {}
  json['mobile'] = mobileNumber

  var url = HOST_NAME_SSL + DEVICE_PATH + '/' + registrationId
  return _request(this, url, json, 'POST')
}
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 );
	}
438284
@SuppressWarnings("unchecked")
    @Override
    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token)
            throws AuthenticationException {
        String id;

        if (AnonymousToken.isAnonymous(token)) {
            // Only continue if an anonymous identity has been set
            if (_anonymousId != null) {
                id = _anonymousId;
            } else {
                return null;
            }
        } else {
            id = ((ApiKeyAuthenticationToken) token).getPrincipal();
        }

        return getUncachedAuthenticationInfoForKey(id);
    }
1328535
public static UserAuthentication checkIfActive(UserAuthentication userAuth, User user, boolean throwException) {
		if (userAuth == null || user == null || user.getIdentifier() == null) {
			if (throwException) {
				throw new BadCredentialsException("Bad credentials.");
			} else {
				logger.debug("Bad credentials. {}", userAuth);
				return null;
			}
		} else if (!user.getActive()) {
			if (throwException) {
				throw new LockedException("Account " + user.getId() + " (" + user.getAppid() + "/" +
						user.getIdentifier() + ") is locked.");
			} else {
				logger.warn("Account {} ({}/{}) is locked.", user.getId(), user.getAppid(), user.getIdentifier());
				return null;
			}
		}
		return userAuth;
	}
1128642
function() {
      var auth = this._auth;

      return this._q(function(resolve) {
        var off;
        function callback() {
          // Turn off this onAuthStateChanged() callback since we just needed to get the authentication data once.
          off();
          resolve();
        }
        off = auth.onAuthStateChanged(callback);
      });
    }