def get_pubkey()

in lambda-authorizer/main.py [0:0]


def get_pubkey( req ):
    device_id = req.get_subject().CN
    d = boto3.client('dynamodb')
    
    response = d.get_item(
        Key={ 'device-id': { 'S' : device_id } },
        TableName=os.environ['SECRETFREE_TABLENAME']
    )

    return response['Item']['pubkey']['S']