ms::Graph method token (public)
<instance of ms::Graph> token [ -grant_type grant_type ] \ [ -scope scope ] [ -assertion assertion ] \ [ -requested_token_use requested_token_use ]
Defined in packages/xooauth/tcl/ms-procs.tcl
Get bearer token (access token) from the /oauth2/v2.0/token endpoint, with timestamp validation (based on "expires_in") result. Obtaining the access token is MsGraph dependent. Probably, some of this can be factored out later to one of the super classes.
- Switches:
- -grant_type (optional, defaults to
"client_credentials"
)- -scope (optional, defaults to
"https://graph.microsoft.com/.default"
)- with prefconfigured permissions: use "https://graph.microsoft.com/.default" Comment: This method performs its own caching via nsvs. It would be better to use the ns_cache framework with it's built-in expiration methods via ns_cache_eval, but we get the expiration time provided from the non-cached call and not upfront, before this call. We do not want to use a hack with double ns_cache calls, so we leave this for the time being.
- -assertion (optional)
- -requested_token_use (optional)
- Testcases:
- No testcase defined.