watson_developer_cloud.iam_token_manager module¶
-
class
IAMTokenManager
(iam_apikey=None, iam_access_token=None, iam_url=None)[source]¶ Bases:
object
-
get_token
()[source]¶ The source of the token is determined by the following logic: 1. If user provides their own managed access token, assume it is valid and send it 2. If this class is managing tokens and does not yet have one, make a request for one 3. If this class is managing tokens and the token has expired refresh it. In case the refresh token is expired, get a new one If this class is managing tokens and has a valid token stored, send it
-