lib/private/User/Session.php
/**
	 * Tries to login the user with auth token header
	 *
	 * @param IRequest $request
	 * @todo check remember me cookie
	 * @return boolean
	 */
Tries to login the user with auth token header
@param IRequest $request
@todo check remember me cookie
@return boolean
Tries to login the user with auth token header @param IRequest $request @todo check remember me cookie @return boolean
public function tryTokenLogin(IRequest $request) {
		$authHeader = $request->getHeader('Authorization');
		if (strpos($authHeader, 'Bearer ') === false) {
			try {
				$token = $this->session->getId();
			} catch (SessionNotAvailableException $ex) {
				return false;
			}
		} else {
			$token = substr($authHeader, 7);
		}
		if (!$this->loginWithToken($token)) {
			return false;
		}
		if(!$this->validateToken($token)) {
			return false;
		}
		return true;
	}
public function tryTokenLogin ( IRequest $ request ) { $ authHeader = $ request -> getHeader ( 'Authorization' ) ; if ( strpos ( $ authHeader , 'Bearer ' ) === false ) { try { $ token = $ this -> session -> getId ( ) ; } catch ( SessionNotAvailableException $ ex ) { return false ; } } else { $ token = substr ( $ authHeader , 7 ) ; } if ( ! $ this -> loginWithToken ( $ token ) ) { return false ; } if ( ! $ this -> validateToken ( $ token ) ) { return false ; } return true ; }
Tries to login the user with auth token header
 @param IRequest $request
 @todo check remember me cookie
 @return boolean
Tries to login the user with auth token header @param IRequest $request @todo check remember me cookie @return boolean
// No auth header, let's try session id