add this line below to get access to credentials:

Credentials credentials = config.getCredentials();