src/napari_tissuemaps_interface/napari_tissuemaps_interface.py
def authenticate(url, username, password):
    """
    Helper function that returns an authentication token

    :param url: The url of the authentication service
    :param username: The username to be used for authentication
    :param password: The password to be used for authentication
    :return: The access token
    """
    response = requests.post(
        url + '/auth',
        data=json.dumps({'username': username, 'password': password}),
        headers={'content-type': 'application/json'},
    )
    response.raise_for_status()
    data = response.json()
    return data['access_token']

    Helper function that returns an authentication token

    :param url: The url of the authentication service
    :param username: The username to be used for authentication
    :param password: The password to be used for authentication
    :return: The access token
    
Helper function that returns an authentication token
Helper function that returns an authentication token
def authenticate(url, username, password):
    response = requests.post(
        url + '/auth',
        data=json.dumps({'username': username, 'password': password}),
        headers={'content-type': 'application/json'},
    )
    response.raise_for_status()
    data = response.json()
    return data['access_token']
def authenticate ( url , username , password ) : response = requests . post ( url + '/auth' , data = json . dumps ( { 'username' : username , 'password' : password } ) , headers = { 'content-type' : 'application/json' } , ) response . raise_for_status ( ) data = response . json ( ) return data [ 'access_token' ]
Helper function that returns an authentication token
Helper function that returns an authentication token
"""
    Helper function that returns an authentication token

    :param url: The url of the authentication service
    :param username: The username to be used for authentication
    :param password: The password to be used for authentication
    :return: The access token
    """
The access token
The access token
url
The url of the authentication service
The url of the authentication service
username
The username to be used for authentication
The username to be used for authentication
password
The password to be used for authentication
The password to be used for authentication