Returns the administrative credentials for this server.

		>>> clc.v2.Server("NY1BTDIPHYP0101").Credentials()
		{u'userName': u'administrator', u'password': u'dszkjh498s^'}
971019
def Credentials(self):
		

		return(clc.v2.API.Call('GET','servers/%s/%s/credentials' % (self.alias,self.name),session=self.session))
1006803
private void getCredentials() {
        jcrService.getUserName(new BaseCallback<String>() {
            @Override
            public void onSuccess(String name) {
                showMainForm(name);
            }
        });
    }
945796
def get_credentials_arn(self):
        
        role = self.iam.Role(self.role_name)
        self.credentials_arn = role.arn
        return role, self.credentials_arn
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.')
884351
async def generate_credentials(self):
        
        identifier, seed = new_credentials()
        return '{0}:{1}'.format(identifier, seed.decode().upper())
274590
def _get_credentials(self):
        # type: () -> Optional[Tuple[str, str]]
        
        site = self.data[self.hdx_site]
        username = site.get('username')
        if username:
            return b64decode(username).decode('utf-8'), b64decode(site['password']).decode('utf-8')
        else:
            return None
1115739
def find_credentials():
    '''
    
    '''

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

    passwords = DETAILS['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 salt.exceptions.VMwareConnectionError('Cannot complete login due to '
                                                'incorrect credentials.')
721157
def index(credentials=None):
        """"""
        user, oauth_access_token = parsecredentials(credentials)
        if not settings.ADMINS or user not in settings.ADMINS:
            return flask.make_response('You shall not pass!!! You are not an administrator!',403)

        usersprojects = {}
        totalsize = {}
        for f in glob.glob(settings.ROOT + "projects/*"):
            if os.path.isdir(f):
                u = os.path.basename(f)
                usersprojects[u], totalsize[u] = getprojects(u)
                usersprojects[u].sort()

        return withheaders(flask.make_response(flask.render_template('admin.html',
                version=VERSION,
                system_id=settings.SYSTEM_ID,
                system_name=settings.SYSTEM_NAME,
                system_description=settings.SYSTEM_DESCRIPTION,
                system_author=settings.SYSTEM_AUTHOR,
                system_version=settings.SYSTEM_VERSION,
                system_email=settings.SYSTEM_EMAIL,
                user=user,
                url=getrooturl(),
                usersprojects = sorted(usersprojects.items()),
                totalsize=totalsize,
                allow_origin=settings.ALLOW_ORIGIN,
                oauth_access_token=oauth_encrypt(oauth_access_token)
        )), "text/html; charset=UTF-8", {'allow_origin':settings.ALLOW_ORIGIN})
694078
def get_credentials(options, environment):
    
    if options['--username'] or options['--auth']:
        if not options['--username']:
            options['<username>'] = lib.prompt("Please enter the username for %s..." % environment)
        if not options['--password']:
            options['<password>'] = lib.prompt("Please enter the password for %s..." % environment, secret=True)
    return options
879738
def _get_auth(self):
        
        if self.version == SNMP_V3:
            # Handling auth/encryption credentials is not (yet) supported.
            # This version supports a security name analogous to community.
            return cmdgen.UsmUserData(self.security)
        else:
            mp_model = 1 if self.version == SNMP_V2C else 0
            return cmdgen.CommunityData(self.community, mpModel=mp_model)
771780
def get_user_credentials(self):
        """"""
        password = None
        token = None
        (username, remember_me,
         remember_token) = self._get_credentials_from_settings()
        valid_py_os = not (PY2 and sys.platform.startswith('linux'))
        if username and remember_me and valid_py_os:
            # Get password from keyring
            try:
                password = keyring.get_password('github', username)
            except Exception:
                # No safe keyring backend
                if self._show_msgbox:
                    QMessageBox.warning(self.parent_widget,
                                        _('Failed to retrieve password'),
                                        _('It was not possible to retrieve '
                                          'your password. Please introduce '
                                          'it again.'))
        if remember_token and valid_py_os:
            # Get token from keyring
            try:
                token = keyring.get_password('github', 'token')
            except Exception:
                # No safe keyring backend
                if self._show_msgbox:
                    QMessageBox.warning(self.parent_widget,
                                        _('Failed to retrieve token'),
                                        _('It was not possible to retrieve '
                                          'your token. Please introduce it '
                                          'again.'))

        if not running_under_pytest():
            credentials = DlgGitHubLogin.login(self.parent_widget, username,
                                            password, token, remember_me,
                                            remember_token)

            if (credentials['username'] and credentials['password'] and
                    valid_py_os):
                self._store_credentials(credentials['username'],
                                        credentials['password'],
                                        credentials['remember'])
                CONF.set('main', 'report_error/remember_me',
                         credentials['remember'])

            if credentials['token'] and valid_py_os:
                self._store_token(credentials['token'],
                                  credentials['remember_token'])
                CONF.set('main', 'report_error/remember_token',
                         credentials['remember_token'])
        else:
            return dict(username=username,
                        password=password,
                        token='',
                        remember=remember_me,
                        remember_token=remember_token)

        return credentials
1124895
def get_credentials(env=None):
    
    environ = env or os.environ
    try:
        username = environ["TEXTMAGIC_USERNAME"]
        token = environ["TEXTMAGIC_AUTH_TOKEN"]
        return username, token
    except KeyError:
        return None, None
1357485
def _read_credential_file(self, cfg):
        
        self.username = cfg.get("rackspace_cloud", "username")
        try:
            self.password = cfg.get("rackspace_cloud", "api_key", raw=True)
        except ConfigParser.NoOptionError as e:
            # Allow either the use of either 'api_key' or 'password'.
            self.password = cfg.get("rackspace_cloud", "password", raw=True)
356377
def obtain_hosting_device_credentials_from_config():
    
    cred_dict = get_specific_config('cisco_hosting_device_credential')
    attr_info = {
        'name': {'allow_post': True, 'allow_put': True,
                 'validate': {'type:string': None}, 'is_visible': True,
                 'default': ''},
        'description': {'allow_post': True, 'allow_put': True,
                        'validate': {'type:string': None},
                        'is_visible': True, 'default': ''},
        'user_name': {'allow_post': True, 'allow_put': True,
                      'validate': {'type:string': None},
                      'is_visible': True, 'default': ''},
        'password': {'allow_post': True, 'allow_put': True,
                     'validate': {'type:string': None},
                     'is_visible': True, 'default': ''},
        'type': {'allow_post': True, 'allow_put': True,
                 'validate': {'type:string': None}, 'is_visible': True,
                 'default': ''}}
    credentials = {}
    for cred_uuid, kv_dict in cred_dict.items():
        # ensure cred_uuid is properly formatted
        cred_uuid = uuidify(cred_uuid)
        verify_resource_dict(kv_dict, True, attr_info)
        credentials[cred_uuid] = kv_dict
    return credentials
59542
def getCredentials(self):
        """"""

        (username, password, public_key, private_key) = self.getCredentialValues()

        if public_key or private_key:
            return UserKeyCredential(username, public_key, private_key)

        if username or password:
            return UserPassCredential(username, password)

        return None
1247470
def credentials
      return @credentials if @credentials
      output = %x"#{@command} #{@name}".lines

      password = output.shift
      username = output.find { |line| line.start_with? 'Username:' }.split(":").pop.strip
      @credentials = {:username => username, :password => password}
    end
859172
def get_user_credentials(self):
        
        # create path to user credentials if needed
        if not os.path.exists(os.path.dirname(self.user_credentials)):
            os.makedirs(os.path.dirname(self.user_credentials))

        credentials = self.store.get()  # retrieve credentials
        needs_to_be_updated = not credentials or credentials.invalid
        if needs_to_be_updated:
            self.get_new_user_credentials()  # get new user credentials
            credentials = self.store.get()  # retrieve new credentials

        return credentials