src/core/smart-service-adapter.service.ts
A service used to initialize and manage the JSDO Session and to manage JSDO catalogs.
ReplaySubject
Properties |
|
Methods |
|
Accessors |
constructor(smartConfig: SmartConfig, smartHttp: SmartHttpService, keycloakService: SmartKeycloakService, secureableService: SmartSecureableService, injector: Injector)
|
||||||||||||||||||
Parameters :
|
Public addCatalog | ||||||
addCatalog(catalog: string)
|
||||||
Attempts to load the given JSDO catalog.
Parameters :
Returns :
Promise<any>
|
Public catalogLoaded | ||||||
catalogLoaded(catalog: string)
|
||||||
Indicates whether a JSDO catalog with the given name has been loaded.
Parameters :
Returns :
boolean
|
Public getCatalog | ||||||
getCatalog(catalog: string)
|
||||||
Returns the JSDO catalog with the given catalog name, if it has been loaded.
Parameters :
Returns :
any
|
Public isAuthorized |
isAuthorized()
|
Returns :
Promise<boolean>
Promise |
Public login | ||||||
login(credentials?: ISmartServiceCredentials)
|
||||||
Logs the user in using the given credentials, or the credentials specified in the app configuration if none are provided.
Parameters :
Returns :
Promise<any>
|
Public logout | ||||||||||||
logout(afterLogoutPage: string, secureableLogout)
|
||||||||||||
Logs the user out.
Parameters :
Returns :
Promise<void>
|
Public oidcLogin | ||||||
oidcLogin(serviceId: string)
|
||||||
Parameters :
Returns :
Promise<any>
Promise |
Public setAppRoutes |
setAppRoutes()
|
Fetches the SmartAppRoutes, decorates and stores them.
Returns :
Promise<boolean>
|
Public afterLogoutPage |
Type : string
|
Public appRoutes |
Type : Route[]
|
The application's routes |
Public oidcToken |
Type : ReplaySubject<string>
|
Default value : new ReplaySubject()
|
Public oidcTokenValue |
Type : string
|
Public state |
Type : SmartServiceAdapterState
|
Default value : {
authenticated: false,
jsdoSession: null,
routesSet: true,
catalogs: [],
initFinished: false,
}
|
The current state of the Smart Service Adapter. |
isKeycloakEnabled |
getisKeycloakEnabled()
|
Indicates whether Keycloak authentication is enabled
Returns :
boolean
|
isSecureableEnabled |
getisSecureableEnabled()
|
Indicates whether Secureable authentication is enabled
Returns :
boolean
|
serviceURI |
getserviceURI()
|
The serviceURI provided in the application's configuration
Returns :
string
|
catalogURI |
getcatalogURI()
|
The catalogURI or
Returns :
string
|
templateURI |
gettemplateURI()
|
The templateURI or
Returns :
string
|
imageURI |
getimageURI()
|
the imageURI or
Returns :
string
|
smartRestURI |
getsmartRestURI()
|
The smartRestURI or
Returns :
string
|