mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#103 moved auth service to core library
This commit is contained in:
@@ -15,28 +15,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import {AlfrescoSettingsService} from './src/services/AlfrescoSettingsService.service';
|
||||
import {AlfrescoTranslationLoader} from './src/services/AlfrescoTranslationLoader.service';
|
||||
import {AlfrescoTranslationService} from './src/services/AlfrescoTranslationService.service';
|
||||
import {AlfrescoPipeTranslate} from './src/services/AlfrescoPipeTranslate.service';
|
||||
import { AlfrescoAuthenticationService } from './src/services/alfresco-authentication.service';
|
||||
|
||||
export * from './src/services/AlfrescoSettingsService.service';
|
||||
export * from './src/services/AlfrescoTranslationLoader.service';
|
||||
export * from './src/services/AlfrescoTranslationService.service';
|
||||
export * from './src/services/AlfrescoPipeTranslate.service';
|
||||
export * from './src/material/MaterialDesignLiteUpgradeElement';
|
||||
|
||||
export default {
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoTranslationLoader,
|
||||
AlfrescoTranslationService,
|
||||
AlfrescoPipeTranslate
|
||||
]
|
||||
};
|
||||
export * from './src/services/alfresco-authentication.service';
|
||||
|
||||
export const ALFRESCO_CORE_PROVIDERS: [any] = [
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoTranslationLoader,
|
||||
AlfrescoTranslationService,
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { it, describe } from 'angular2/testing';
|
||||
import { it, describe, beforeEach } from 'angular2/testing';
|
||||
import { provide, Injector } from 'angular2/core';
|
||||
import { Http, HTTP_PROVIDERS, XHRBackend, Response, ResponseOptions } from 'angular2/http';
|
||||
import { MockBackend } from 'angular2/http/testing';
|
@@ -19,8 +19,6 @@ import { Injectable } from 'angular2/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Http, Headers, Response } from 'angular2/http';
|
||||
|
||||
declare let xml2json: any;
|
||||
|
||||
/**
|
||||
* The AlfrescoAuthenticationService provide the login service and store the token in the localStorage
|
||||
*/
|
@@ -16,15 +16,7 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoLoginComponent } from './src/components/alfresco-login.component';
|
||||
import { AlfrescoAuthenticationService } from './src/services/alfresco-authentication.service';
|
||||
|
||||
export * from './src/components/alfresco-login.component';
|
||||
export * from './src/services/alfresco-authentication.service';
|
||||
|
||||
export default {
|
||||
directives: [AlfrescoLoginComponent],
|
||||
providers: [AlfrescoAuthenticationService]
|
||||
};
|
||||
|
||||
export const ALFRESCO_LOGIN_DIRECTIVES: [any] = [AlfrescoLoginComponent];
|
||||
export const ALFRESCO_AUTHENTICATION: [any] = [AlfrescoAuthenticationService];
|
||||
|
@@ -17,8 +17,7 @@
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { provide } from 'angular2/core';
|
||||
|
||||
import { AlfrescoAuthenticationService } from './../services/alfresco-authentication.service';
|
||||
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
|
||||
export class AuthenticationMock {
|
||||
|
||||
|
@@ -18,8 +18,12 @@
|
||||
import { Component, Output, EventEmitter } from 'angular2/core';
|
||||
import { Router, ROUTER_DIRECTIVES } from 'angular2/router';
|
||||
import { FORM_DIRECTIVES, ControlGroup, FormBuilder, Validators } from 'angular2/common';
|
||||
import { AlfrescoAuthenticationService } from './../services/alfresco-authentication.service';
|
||||
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
import {
|
||||
AlfrescoTranslationService,
|
||||
AlfrescoPipeTranslate,
|
||||
AlfrescoAuthenticationService
|
||||
} from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
|
||||
declare let componentHandler: any;
|
||||
declare let __moduleName: string;
|
||||
|
||||
@@ -52,6 +56,7 @@ export class AlfrescoLoginComponent {
|
||||
* @param _fb
|
||||
* @param auth
|
||||
* @param router
|
||||
* @param translate
|
||||
*/
|
||||
constructor(private _fb: FormBuilder,
|
||||
public auth: AlfrescoAuthenticationService,
|
||||
|
Reference in New Issue
Block a user