[ADF-3162] Setting component - Should be able to render the providers passed as input (#3464)

* Be able to change the available providers values

* Add deprecated tag

* add default providers

* Fix empty OAuth and selected providers
Improve the documentation

* Fix BPM guard to check SSO condition

* Add the oauthConfig again

* SSO or Basic otpion auth setting change

* fix host settings sso/basic
add login documentation

* remove test string

* fix auth guard test

* dispose upload emitter test events

* remove space

* exclude failing test
This commit is contained in:
Maurizio Vitale
2018-06-12 17:52:36 +01:00
committed by Eugenio Romano
parent 9221d1d0d0
commit 476b5864bf
22 changed files with 413 additions and 470 deletions

View File

@@ -13,7 +13,7 @@ Validates the URLs for ACS and APS and saves them in the user's local storage
```html
<adf-host-settings>
</adf-breadcrumb>
</adf-host-settings>
```
## Class members
@@ -22,12 +22,12 @@ Validates the URLs for ACS and APS and saves them in the user's local storage
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| providers | `string` | "ALL" | Determines which configurations are shown. Possible valid values are "ECM", "BPM" or "ALL". |
| providers | `array` | | Tell the component which provider option are available. Possible valid values are "ECM" (Content), "BPM" (Process) , "ALL" (Content and Process), 'OAUTH2' SSO . |
### Events
| Name | Type | Description |
| -- | -- | -- |
| bpmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the bpm host URL is changed. |
| ecmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the ecm host URL is changed. |
| bpmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the bpm host URL is changed. **Deprecated:** in 2.4.0 |
| ecmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the ecm host URL is changed. **Deprecated:** in 2.4.0 |
| error | `EventEmitter<string>` | Emitted when the URL is invalid. |

View File

@@ -273,6 +273,31 @@ export class MyCustomLogin {
}
```
### SSO login
### Implicit Flow
If the 'app.config.json' or you used the host-setting component to use the SSO Oauth the login component will show only a button to login:
```JSON
"authType" :"OAUTH",
"oauth2": {
"host": "http://localhost:30081/auth/realms/myrealm",
"clientId": "activiti",
"scope": "openid",
"secret": "",
"implicitFlow": true,
"silentLogin": false,
"redirectUri": "/",
"redirectUriLogout": "/logout"
},
```
![Login component](../docassets/images/sso-login.png)
Note if the silentLogin property in the oauth2 configuration is true will not be possible to show the login page. with silentLogin true the application is automatically redirect to the
authorization server when is not logged-in
Note that if you do not call `event.preventDefault()` then the default behaviour
will execute _after_ your custom code has completed.