def validate_auth_info(self, context, user_ref, tenant_ref):
 if (not user_ref.get('enabled', True)):
  msg = ('User is disabled: %s' % user_ref['id'])
  LOG.warning(msg)
  raise exception.Unauthorized(msg)
 user_domain_ref = self.identity_api.get_domain(context, user_ref['domain_id'])
 if (user_domain_ref and (not user_domain_ref.get('enabled', True))):
  msg = ('Domain is disabled: %s' % user_domain_ref['id'])
  LOG.warning(msg)
  raise exception.Unauthorized(msg)
 if tenant_ref:
  if (not tenant_ref.get('enabled', True)):
   msg = ('Tenant is disabled: %s' % tenant_ref['id'])
   LOG.warning(msg)
   raise exception.Unauthorized(msg)
  project_domain_ref = self.identity_api.get_domain(context, tenant_ref['domain_id'])
  if (project_domain_ref and (not project_domain_ref.get('enabled', True))):
   msg = ('Domain is disabled: %s' % project_domain_ref['id'])
   LOG.warning(msg)
   raise exception.Unauthorized(msg)

def validate_auth_info ( self , context , user_ref , tenant_ref ) : if ( not user_ref . get ( 'enabled' , True ) ) : msg = ( 'User is disabled: %s' % user_ref [ 'id' ] ) LOG . warning ( msg ) raise exception . Unauthorized ( msg ) user_domain_ref = self . identity_api . get_domain ( context , user_ref [ 'domain_id' ] ) if ( user_domain_ref and ( not user_domain_ref . get ( 'enabled' , True ) ) ) : msg = ( 'Domain is disabled: %s' % user_domain_ref [ 'id' ] ) LOG . warning ( msg ) raise exception . Unauthorized ( msg ) if tenant_ref : if ( not tenant_ref . get ( 'enabled' , True ) ) : msg = ( 'Tenant is disabled: %s' % tenant_ref [ 'id' ] ) LOG . warning ( msg ) raise exception . Unauthorized ( msg ) project_domain_ref = self . identity_api . get_domain ( context , tenant_ref [ 'domain_id' ] ) if ( project_domain_ref and ( not project_domain_ref . get ( 'enabled' , True ) ) ) : msg = ( 'Domain is disabled: %s' % project_domain_ref [ 'id' ] ) LOG . warning ( msg ) raise exception . Unauthorized ( msg )
validate user and tenant auth info .