Using API Token rather than key. Token now in header. Closes #358.

This commit is contained in:
James Brooks
2015-01-12 13:34:31 +00:00
parent 342281ef0d
commit cc43dcc6aa
8 changed files with 37 additions and 39 deletions
+2 -2
View File
@@ -81,8 +81,8 @@ return [
return new Dingo\Api\Auth\BasicProvider($app['auth']);
},
'api_key' => function ($app) {
return new CachetHQ\Cachet\Http\Auth\ApiKeyAuthenticator();
'api_token' => function ($app) {
return new CachetHQ\Cachet\Http\Auth\ApiTokenAuthenticator();
},
],
+6 -6
View File
@@ -77,12 +77,12 @@ return [
],
'user' => [
'username' => 'Username',
'email' => 'Email',
'password' => 'Password',
'api-key' => 'API Key',
'api-key-help' => 'Regenerating your API key will revoke all existing applications.',
'2fa' => [
'username' => 'Username',
'email' => 'Email',
'password' => 'Password',
'api-token' => 'API Token',
'api-token-help' => 'Regenerating your API token will revoke all existing applications.',
'2fa' => [
'help' => 'Enabling two factor authentication increases security of your account. You will need to download <a href="https://support.google.com/accounts/answer/1066447?hl=en">Google Authenticator</a> or a similar app on to your mobile device. When you login you will be asked to provide a token generated by the app.',
],
],
+6 -6
View File
@@ -77,12 +77,12 @@ return [
],
'user' => [
'username' => 'Identifiant',
'email' => 'Adresse email',
'password' => 'Mot de passe',
'api-key' => 'Clé API',
'api-key-help' => 'Regénérer votre clé API révoquera toutes les applications existantes.',
'2fa' => [
'username' => 'Identifiant',
'email' => 'Adresse email',
'password' => 'Mot de passe',
'api-token' => 'Jeton API',
'api-token-help' => 'Regénérer votre jeton API révoquera toutes les applications existantes.',
'2fa' => [
'help' => 'Enabling two factor authentication increases security of your account. You will need to download <a href="https://support.google.com/accounts/answer/1066447?hl=en">Google Authenticator</a> or a similar app on to your mobile device. When you login you will be asked to provide a token generated by the app.',
],
],
+6 -6
View File
@@ -76,12 +76,12 @@ return [
],
'user' => [
'username' => 'Usuário',
'email' => 'Email',
'password' => 'Senha',
'api-key' => 'Chave da API',
'api-key-help' => 'Regenerar sua chave de API irá revogar todos os aplicativos existentes.',
'2fa' => [
'username' => 'Usuário',
'email' => 'Email',
'password' => 'Senha',
'api-token' => 'API Token',
'api-token-help' => 'Regenerating your API token will revoke all existing applications.',
'2fa' => [
'help' => 'Enabling two factor authentication increases security of your account. You will need to download <a href="https://support.google.com/accounts/answer/1066447?hl=en">Google Authenticator</a> or a similar app on to your mobile device. When you login you will be asked to provide a token generated by the app.',
],
],
+2 -2
View File
@@ -29,9 +29,9 @@
</div>
<hr />
<div class="form-group">
<label>{{ trans('forms.user.api-key') }}</label>
<label>{{ trans('forms.user.api-token') }}</label>
<input type="text" class="form-control" name="api_key" disabled value="{{ Auth::user()->api_key }}" />
<span class="help-block">{{ trans('forms.user.api-key-help') }}</span>
<span class="help-block">{{ trans('forms.user.api-token-help') }}</span>
</div>
<hr />
<div class="form-group">