Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions class-auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ class Auth {
*/
private $jwt_error = null;

/**
* Collection of translate-able messages.
*
* @var array
*/
private $messages = array();

/**
* The REST API slug.
*
Expand All @@ -54,11 +47,6 @@ class Auth {
*/
public function __construct() {
$this->namespace = 'jwt-auth/v1';

$this->messages = array(
'jwt_auth_no_auth_header' => __( 'Authorization header not found.', 'jwt-auth' ),
'jwt_auth_bad_auth_header' => __( 'Authorization header malformed.', 'jwt-auth' ),
);
}

/**
Expand Down Expand Up @@ -402,7 +390,7 @@ public function validate_token( $return_response = true ) {
'success' => false,
'statusCode' => 401,
'code' => 'jwt_auth_no_auth_header',
'message' => $this->messages['jwt_auth_no_auth_header'],
'message' => __( 'Authorization header not found.', 'jwt-auth' ),
'data' => array(),
),
401
Expand All @@ -421,7 +409,7 @@ public function validate_token( $return_response = true ) {
'success' => false,
'statusCode' => 401,
'code' => 'jwt_auth_bad_auth_header',
'message' => $this->messages['jwt_auth_bad_auth_header'],
'message' => __( 'Authorization header malformed.', 'jwt-auth' ),
'data' => array(),
),
401
Expand Down
2 changes: 1 addition & 1 deletion class-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct() {
* Setup textdomain.
*/
public function setup_text_domain() {
load_plugin_textdomain( 'jwt-auth', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
load_plugin_textdomain( 'jwt-auth', false, plugin_basename( __DIR__ ) . '/languages' );
}

/**
Expand Down