original_docstring: Request a new access_token from the IdP.
  
          Use the refresh_token to obtain a new access token.
  
          Args:
             refresh_token (bytes): refresh_token
          
docstring: Request a new access_token from the IdP.
  Use the refresh_token to obtain a new access token.
docstring_tokens: Request a new access_token from the IdP . Use the refresh_token to obtain a new access token .
code: async def idp_refresh_token(self, refresh_token):
          """Request a new access_token from the IdP.
  
          Use the refresh_token to obtain a new access token.
  
          Args:
             refresh_token (bytes): refresh_token
          """
          headers = {"Accept": "application/json", "User-Agent": "JupyterHub"}
  
          if self.basic_auth:
              b64key = base64.b64encode(
                  bytes("{}:{}".format(self.client_id, self.client_secret), "utf8")
              )
              headers.update({"Authorization": "Basic {}".format(b64key.decode("utf8"))})
  
          params = dict(grant_type="refresh_token", refresh_token="refresh_token")
  
          req = HTTPRequest(
              self.token_url,
              method="POST",
              headers=headers,
              validate_cert=self.tls_verify,
              body=urllib.parse.urlencode(params),
          )
          resp = await AsyncHTTPClient().fetch(req)
          return json.loads(resp.body.decode("utf8", "replace"))
code_tokens: async def idp_refresh_token ( self , refresh_token ) : headers = { "Accept" : "application/json" , "User-Agent" : "JupyterHub" } if self . basic_auth : b64key = base64 . b64encode ( bytes ( "{}:{}" . format ( self . client_id , self . client_secret ) , "utf8" ) ) headers . update ( { "Authorization" : "Basic {}" . format ( b64key . decode ( "utf8" ) ) } ) params = dict ( grant_type = "refresh_token" , refresh_token = "refresh_token" ) req = HTTPRequest ( self . token_url , method = "POST" , headers = headers , validate_cert = self . tls_verify , body = urllib . parse . urlencode ( params ) , ) resp = await AsyncHTTPClient ( ) . fetch ( req ) return json . loads ( resp . body . decode ( "utf8" , "replace" ) )
short_docstring: Request a new access_token from the IdP.
short_docstring_tokens: Request a new access_token from the IdP .
comment: """Request a new access_token from the IdP.
  
          Use the refresh_token to obtain a new access token.
  
          Args:
             refresh_token (bytes): refresh_token
          """