private String createServiceCredentials ( AuthleteConfiguration configuration ) { if ( configuration . getServiceAccessToken ( ) != null ) { return "Bearer " + configuration . getServiceAccessToken ( ) ; } else { String key = configuration . getServiceApiKey ( ) ; String secret = configuration . getServiceApiSecret ( ) ; return new BasicCredentials ( key , secret ) . format ( ) ; } }
Create an authorization header for the service .