Authentication for Clients?
Opened this issue · 2 comments
bbertka commented
Will there be any ability to authenticate as a client into a PCF marketplace gemfire service?
metatype commented
Are you asking if the python client connecting via REST to a GemFire cluster running in PCF supports authentication?
kdunn-pivotal commented
This is quite straightforward to add, since the underlying request library is requests
.
In file python2.7/site-packages/gemfire/GemfireClient.py
:
class GemfireClient:
'''
Allows application to store and access data stored in GemFire over REST. Please see:
http://gemfire.docs.pivotal.io/latest/userguide/index.html#gemfire_rest/setup_config.html
for instructions on setting up GemFire's REST service.
'''
def __init__(self, hostname, port, user, password, debug_mode=False):
'''Initializes the Client with the given hostname and port'''
self.hostname = hostname
self.port = port
self.user = user
self.password = password
and in the same file:
def connection(self):
''' Checks connection to the server '''
data = requests.get(self.base_url, auth=(self.user, self.password))