Skip to content

Commit 5251483

Browse files
committed
Remove all trailing spaces
1 parent 55faa76 commit 5251483

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Build Status](https://travis-ci.org/neroniaky/angular2-token.svg?branch=master)](https://travis-ci.org/neroniaky/angular2-token)
88
[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://angular.io/styleguide)
99

10-
Token based authentication service for Angular2 with multiple user support. Angular2-Token works best with the [devise token auth](https://github.com/lynndylanhurley/devise_token_auth) gem for Rails.
10+
Token based authentication service for Angular2 with multiple user support. Angular2-Token works best with the [devise token auth](https://github.com/lynndylanhurley/devise_token_auth) gem for Rails.
1111
Angular2-Token is currently in Alpha. Any contribution is much appreciated.
1212

1313
You can try out Angular2-Token [here](https://angular2-token.herokuapp.com/).
@@ -335,7 +335,7 @@ export class OauthCallbackComponent implements OnInit {
335335
```
336336
337337
## HTTP Service Wrapper
338-
`Angular2TokenService` wraps all standard Angular2 Http Service calls for authentication and token processing.
338+
`Angular2TokenService` wraps all standard Angular2 Http Service calls for authentication and token processing.
339339
If `apiPath` is configured it gets added in front of path.
340340
- `get(url: string, options?: RequestOptionsArgs): Observable<Response>`
341341
- `post(url: string, body: any, options?: RequestOptionsArgs): Observable<Response>`
@@ -377,20 +377,20 @@ this._tokenService.currentUserType; // ADMIN
377377
```
378378
379379
## Route Guards
380-
Angular2-Token implements the `CanActivate` interface, so it can directly be used as a route guard.
380+
Angular2-Token implements the `CanActivate` interface, so it can directly be used as a route guard.
381381
If the `signInRedirect` option is set the user will be redirected on a failed (=false) CanActivate using `Router.navigate()`.
382382
It currently does not distinguish between user types.
383383
384384
#### Example:
385385
```javascript
386386
const routerConfig: Routes = [
387-
{
388-
path: '',
389-
component: PublicComponent
387+
{
388+
path: '',
389+
component: PublicComponent
390390
}, {
391-
path: 'restricted',
392-
component: RestrictedComponent,
393-
canActivate: [Angular2TokenService]
391+
path: 'restricted',
392+
component: RestrictedComponent,
393+
canActivate: [Angular2TokenService]
394394
}
395395
];
396396
```
@@ -399,7 +399,7 @@ const routerConfig: Routes = [
399399
More advanced methods can be used if a higher degree of customization is required.
400400
401401
### .request()
402-
More customized requests can be send with the `.request()`-function. It accepts the RequestOptionsArgs-Interface.
402+
More customized requests can be send with the `.request()`-function. It accepts the RequestOptionsArgs-Interface.
403403
More information can be found in the Angular2 API Reference [here](https://angular.io/docs/ts/latest/api/http/index/RequestOptionsArgs-interface.html).
404404
405405
`request(options: RequestOptionsArgs): Observable<Response>`
@@ -424,7 +424,7 @@ Returns current user type as string like specified in the options.
424424
`get currentUserType(): string`
425425
426426
### .currentUserData
427-
Returns current user data as returned by devise token auth.
427+
Returns current user data as returned by devise token auth.
428428
This variable is `null` after page reload until the `.validateToken()` call is answerd by the backend.
429429
430430
`get currentUserData(): UserData`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@types/selenium-webdriver": "2.53.36",
3939
"@types/source-map": "0.5.0",
4040
"@types/webpack": "2.0.0",
41-
41+
4242
"awesome-typescript-loader": "3.0.0-beta.10",
4343
"core-js": "2.4.1",
4444
"http-server": "0.9.0",

src/a2t-ui/a2t-reset-password/a2t-reset-password.component.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.email-send-text {
1+
.email-send-text {
22
background-color: #72c380;
3-
color: white;
3+
color: white;
44
font-size: 16pt;
55
text-align: center;
66
padding: 20px;

src/a2t-ui/a2t-ui.routes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ const routes: Routes = [{
1414
{ path: 'sign-in', component: A2tSignInComponent },
1515
{ path: 'sign-up', component: A2tSignUpComponent },
1616
{ path: 'reset-password', component: A2tResetPasswordComponent },
17-
{
18-
path: 'update-password',
19-
component: A2tUpdatePasswordComponent,
20-
canActivate: [Angular2TokenService]
17+
{
18+
path: 'update-password',
19+
component: A2tUpdatePasswordComponent,
20+
canActivate: [Angular2TokenService]
2121
}
2222
]
2323
}];

src/angular2-token.model.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export interface AuthData {
3737

3838
export interface UserData {
3939
id: number;
40-
provider: string;
41-
uid: string;
42-
name: string;
43-
nickname: string;
40+
provider: string;
41+
uid: string;
42+
name: string;
43+
nickname: string;
4444
image: any;
4545
email: string;
4646
}

src/angular2-token.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ export class Angular2TokenService implements CanActivate {
7878
// Redirect user to sign in if signInRedirect is set
7979
if(this._options.signInRedirect)
8080
this._router.navigate([this._options.signInRedirect]);
81-
81+
8282
return false;
83-
}
83+
}
8484
}
8585

8686
// Inital configuration
@@ -320,7 +320,7 @@ export class Angular2TokenService implements CanActivate {
320320

321321
let baseRequestOptions: RequestOptions;
322322
let baseHeaders: { [key:string]: string; } = this._options.globalOptions.headers;
323-
323+
324324
// Merge auth headers to request if set
325325
if (this._currentAuthData != null) {
326326
(<any>Object).assign(baseHeaders, {

0 commit comments

Comments
 (0)