#NEWLINE# def get_refresh_token( self , target_id , grant_type , sid ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# lifetime = self . token_policy [ 'refresh_token' ] [ target_id ] [ grant_type ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise NotAllowed ( 'Issue access token for grant_type {} for target_id {} not allowed' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . refresh_token_factory ( self , target_id = target_id , lifetime = lifetime )