mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-05-30 06:49:11 +02:00
Add route to get TwoFAccount with sensitive data
This commit is contained in:
parent
8253d28102
commit
27dd64a965
@ -93,6 +93,18 @@ class TwoFAccountController extends Controller
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display the specified resource with all attributes.
|
||||
*
|
||||
* @param \App\TwoFAccount $twofaccount
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function showWithSensitive(TwoFAccount $twofaccount)
|
||||
{
|
||||
return response()->json($twofaccount->makeVisible(['uri', 'secret', 'algorithm']), 200);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Save new order.
|
||||
*
|
||||
|
@ -38,6 +38,7 @@ Route::group(['middleware' => 'auth:api'], function() {
|
||||
|
||||
Route::delete('twofaccounts/batch', 'TwoFAccountController@batchDestroy');
|
||||
Route::patch('twofaccounts/reorder', 'TwoFAccountController@reorder');
|
||||
Route::get('twofaccounts/{twofaccount}/withSensitive', 'TwoFAccountController@showWithSensitive');
|
||||
Route::apiResource('twofaccounts', 'TwoFAccountController');
|
||||
Route::patch('group/accounts', 'GroupController@associateAccounts');
|
||||
Route::apiResource('groups', 'GroupController');
|
||||
|
Loading…
x
Reference in New Issue
Block a user