mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2289] Login with oauth2 provider (#2924)
* Fix oauth2 provider * Add the schema validation * Improve the login doc with provider "OAUTH" * fix doc
This commit is contained in:
committed by
Eugenio Romano
parent
3368607aff
commit
37561d1d27
@@ -332,6 +332,17 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"oauth2": {
|
||||
"description": "AUTH configuration parameters",
|
||||
"type": "object",
|
||||
"required": [ "host", "clientId", "secret" ],
|
||||
"properties": {
|
||||
"host": { "type": "string" },
|
||||
"authPath": { "type": "string" },
|
||||
"clientId": { "type": "string" },
|
||||
"secret": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -88,7 +88,8 @@ export class AlfrescoApiService {
|
||||
hostEcm: this.appConfig.get<string>('ecmHost'),
|
||||
hostBpm: this.appConfig.get<string>('bpmHost'),
|
||||
contextRoot: 'alfresco',
|
||||
disableCsrf: this.storage.getItem('DISABLE_CSRF') === 'true'
|
||||
disableCsrf: this.storage.getItem('DISABLE_CSRF') === 'true',
|
||||
oauth2 : this.appConfig.get<any>('oauth2')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -174,6 +174,7 @@ export class AuthenticationService {
|
||||
saveTickets(): void {
|
||||
this.saveTicketEcm();
|
||||
this.saveTicketBpm();
|
||||
this.saveTicketAuth();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,6 +195,15 @@ export class AuthenticationService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The method save the AUTH ticket in the Storage
|
||||
*/
|
||||
saveTicketAuth(): void {
|
||||
if (this.alfrescoApi.getInstance() && (<any>this.alfrescoApi.getInstance()).getTicketAuth()) {
|
||||
this.storage.setItem('ticket-AUTH', (<any>this.alfrescoApi.getInstance()).getTicketAuth());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The method return true if user is logged in on ecm provider
|
||||
*
|
||||
|
Reference in New Issue
Block a user