Returns hot observable that sends ClientEvents when they happen.
Once this observable returns, the authentication procedure is over. This is usefull for any Auth checking (eg. Auth Guards)
The client options used at contstruction time.
A cache of all currently known and defined tokens.
Generates a URI to let the user logout. Typically you want to redirect the user to this url.
Generates a URI to let the user login. Typically you want to redirect the user to this url. The resulting token will be in the fragment of the redirectUri;
Returns an observable to get a new RPT. Call this after init() if you want to have an RPT available immediatly
Optional ticket used for authMode 'uma'
Construct a GraphQL Endpoint instance.
Initializes the client with the Authorization server, logging in if logged in previously. Must be called before any authed calls can be made!
Observable boolean stating whether init performed a login with the hash url.
Checks locally if logInfo is present in storage and not expired. Good condition for using in a Guard.
Keep logged in session alive by refreshing or re-requesting RPTs (in case of offline token present) Subscribe to start.
Configurable leeway in milliseconds for when expiration and thus refresh logic is due. (Defaults to 3000)
Do login, by changing the url with a client side redirect.
Login as client. This can be used to login as the client itself. It will immediatly request an RPT token and return that.
Do logout, by changing the url with a client side redirect.
Optional redirectUri to return to after logout, defaults to current url;
Checks the decoded RPT token for the presence of the given role string
String of a role to check for in the RPT token
String of the targetClientId to check the roles for. Defaults to the Obelisk API id