get the account details for credentials provided
549287
def get_logged_in_account(token_manager=None,
                          app_url=defaults.APP_URL):
    
    headers = token_manager.get_access_token_headers()
    auth_url = environment.get_auth_url(app_url=app_url)
    url = "%s/api/v1/account" % auth_url

    response = requests.get(url,
                            headers=headers)

    if response.status_code == 200:
        return response.json()

    else:
        raise JutException('Error %s; %s' % (response.status_code, response.text))
1234842
def user_credentials(self):
        
        credentials = {}
        login = self.cleaned_data["login"]
        if app_settings.AUTHENTICATION_METHOD == AuthenticationMethod.EMAIL:
            credentials["email"] = login
        elif (
                app_settings.AUTHENTICATION_METHOD ==
                AuthenticationMethod.USERNAME):
            credentials["username"] = login
        else:
            if self._is_login_email(login):
                credentials["email"] = login
            credentials["username"] = login
        credentials["password"] = self.cleaned_data["password"]
        return credentials
252391
def _credentials(self):
        

        if self.aws_account_id and self.aws_arn_role_name:
            return 'aws_iam_role=arn:aws:iam::{id}:role/{role}'.format(
                id=self.aws_account_id,
                role=self.aws_arn_role_name
            )
        elif self.aws_access_key_id and self.aws_secret_access_key:
            return 'aws_access_key_id={key};aws_secret_access_key={secret}{opt}'.format(
                key=self.aws_access_key_id,
                secret=self.aws_secret_access_key,
                opt=';token={}'.format(self.aws_session_token) if self.aws_session_token else ''
            )
        else:
            raise NotImplementedError("Missing Credentials. "
                                      "Ensure one of the pairs of auth args below are set "
                                      "in a configuration file, environment variables or by "
                                      "being overridden in the task: "
                                      "'aws_access_key_id' AND 'aws_secret_access_key' OR "
                                      "'aws_account_id' AND 'aws_arn_role_name'")
1057587
def user_account(self):
        """"""
        self.account_info = None

        url = 'https://tccna.honeywell.com/WebAPI/emea/api/v1/userAccount'

        response = requests.get(url, headers=self._headers())
        response.raise_for_status()

        self.account_info = response.json()
        return self.account_info
349804
def getCredentialValues(self, new=False):
        """"""

        credentials_base = "credentials."
        return tuple([self.getValue(credentials_base + p) for p in [
            "username", "password", "private_key"]])
1028363
def getCredentials():
    ''' 
        
    '''
    logger = logging.getLogger("osrframework.utils")
    # Dictionary of lists:
    #     {'Twitter': {cred1, cred2, ...}}
    creds = {} 
    try:
        credsTuples = c_creds.returnListOfCreds()

        for cTuple in credsTuples:
            plat, user, password = cTuple

            c = Credential(user, password)

            if plat not in creds.keys():
                creds[plat] = [c]
            else:
                creds[plat] = creds[plat].append(c)
        logger.info(str(len(credsTuples)) + " credentials have been loaded.")    
        return creds
    except Exception, e:
        logger.error("WARNING. Something happened when loading credentials.")
        logger.error(str(e))        
        logger.debug("No credentials were loaded.")    
    return {}
400299
def accounts(self):
        
        d = {}

        if False and not self._account_password:
            from ambry.dbexceptions import ConfigurationError
            raise ConfigurationError(
                "Can't access accounts without setting an account password"
                " either in the accounts.password config, or in the AMBRY_ACCOUNT_PASSWORD"
                " env var.")

        for act in self.database.session.query(Account).all():
            if self._account_password:
                act.secret_password = self._account_password
            e = act.dict
            a_id = e['account_id']
            d[a_id] = e

        return d
648849
def find_credentials():
    '''
    
    '''

    # if the username and password were already found don't go through the
    # connection process again
    if 'username' in DETAILS and 'password' in DETAILS:
        return DETAILS['username'], DETAILS['password']

    passwords = __pillar__['proxy']['passwords']
    for password in passwords:
        DETAILS['password'] = password
        if not __salt__['vsphere.test_vcenter_connection']():
            # We are unable to authenticate
            continue
        # If we have data returned from above, we've successfully authenticated.
        return DETAILS['username'], password
    # We've reached the end of the list without successfully authenticating.
    raise excs.VMwareConnectionError('Cannot complete login due to '
                                     'incorrect credentials.')
1215336
def get_credentials(self):
        
        return Credentials(access_key=self.aws_access_key_id,
                           secret_key=self.aws_secret_access_key,
                           token=self.aws_session_token)
721162
def credentials(self):
        
        if self._credentials is None:
            self._credentials = CredentialList(self)
        return self._credentials
1048269
def user_info(self):
        
        account_uri = self.uri.split('/api/v1')[0] + '/account'
        req = self.request(account_uri)
        account_info = req.get()
        user_data = HTMLParser(account_info.content)
        return user_data
1110570
def login_details(self):
        
        if not self.__login_details:
            self.__login_details = LoginDetails(self.__connection)
        return self.__login_details
182918
def details(self):
        """"""
        return self.dest_user.profile.details.convert_and_update(
            self.source_profile.details.as_dict
        )
897698
private static void getAccountInfoBySettingClient() {
    try {
      Account response = Account.getter()
        .client(client)
        .get();
      System.out.println(response);
    } catch (PlivoRestException | IOException e) {
      e.printStackTrace();
    }
  }
1352078
def _get_credentials_from_settings(self):
        """"""
        remember_me = CONF.get('main', 'report_error/remember_me')
        remember_token = CONF.get('main', 'report_error/remember_token')
        username = CONF.get('main', 'report_error/username', '')
        if not remember_me:
            username = ''

        return username, remember_me, remember_token
1015271
def get_account_details(self):
        
        return self.make_api_request(
            'Account',
            'getAccountDetails',
            utils.get_kwargs(locals()),
            model=models.AccountDetailsResponse,
        )
971019
def Credentials(self):
		

		return(clc.v2.API.Call('GET','servers/%s/%s/credentials' % (self.alias,self.name),session=self.session))