common/modules/api_v1/v1/ApiService/Auth.php
/**
    * Refresh Token Method,use as Midelware
    * Refresh token with token and refresh token body params
    */
Refresh Token Method,use as Midelware
Refresh token with token and refresh token body params
Refresh Token Method use as Midelware Refresh token with token and refresh token body params
public function RefreshToken(){
        $refresh_token = \Yii::$app->request->post('refresh_token');
        $token = \Yii::$app->request->post('token');
        if(null!=$refresh_token && null!=$token){
            $api_user = new ApiUser;
            $tokens = $api_user->RefreshToken($token,$refresh_token);
            if(null!=$tokens){
                return ['message'=>'success','token'=>$tokens->token,'refresh_token'=>$tokens->refresh_token,'expires'=>$tokens->expiration_date];   
            }else{
                return ['message'=>'Incorect Credentials'];
            }
        }else{
            return ['message'=>"error"];
        }
    }
public function RefreshToken ( ) { $ refresh_token = \ Yii :: $ app -> request -> post ( 'refresh_token' ) ; $ token = \ Yii :: $ app -> request -> post ( 'token' ) ; if ( null != $ refresh_token && null != $ token ) { $ api_user = new ApiUser ; $ tokens = $ api_user -> RefreshToken ( $ token , $ refresh_token ) ; if ( null != $ tokens ) { return [ 'message' => 'success' , 'token' => $ tokens -> token , 'refresh_token' => $ tokens -> refresh_token , 'expires' => $ tokens -> expiration_date ] ; } else { return [ 'message' => 'Incorect Credentials' ] ; } } else { return [ 'message' => " error " ] ; } }
Refresh Token Method,use as Midelware
 Refresh token with token and refresh token body params
Refresh Token Method use as Midelware Refresh token with token and refresh token body params