[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/tests/tests/auth/ -> login_secure.php (source)

   1  <?php
   2  
   3  require_once ( 'login_base.php' );
   4  
   5  /**
   6   * Login tests - API + "secure passwordless" without a time limited token
   7   *
   8   * @group auth
   9   * @group login
  10   * @since 0.1
  11   */
  12  class Auth_Login_API_Secure_Tests extends Login_Base {
  13  
  14      public static function setUpBeforeClass(): void {
  15          yourls_add_filter( 'is_API', 'yourls_return_true' );
  16          $_REQUEST['signature'] = yourls_auth_signature( 'yourls' );
  17          /* Attempt login with valid signature & timestamp. Tests with invalid signatures are made directly
  18           *  against the check function, not in a full login procedure. See auth.php
  19           */
  20      }
  21  
  22      public static function tearDownAfterClass(): void {
  23          yourls_remove_filter( 'is_API', 'yourls_return_true' );
  24          unset( $_REQUEST['signature'] );
  25      }
  26  
  27  }


Generated: Tue Sep 27 05:10:01 2022 Cross-referenced by PHPXref 0.7.1