Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unsigned config option to auth w/o aws creds #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import os

from setuptools import setup, find_packages
from pip.req import parse_requirements
from pip._internal.req import parse_requirements
from pip._internal.req.req_file import ParsedRequirement

install_reqs = parse_requirements('requirements.txt', session=False)
test_reqs = parse_requirements('requirements_test.txt', session=False)

version = '0.6.1'
version = '0.7.0'

README="""Python class to integrate Boto3's Cognito client so it is easy to login users. With SRP support."""

Expand All @@ -28,9 +29,9 @@
packages=find_packages(),
url='https://github.com/capless/warrant',
license='Apache License 2.0',
install_requires=[str(ir.req) for ir in install_reqs],
install_requires=[str(x.requirement) for x in install_reqs],
extras_require={
'test': [str(ir.req) for ir in test_reqs]
'test': [str(x.requirement) for x in test_reqs]
},
include_package_data=True,
zip_safe=True,
Expand Down
4 changes: 4 additions & 0 deletions warrant/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ast
import boto3
import botocore
import datetime
import re
import requests
Expand Down Expand Up @@ -169,6 +170,9 @@ def __init__(
if user_pool_region:
boto3_client_kwargs['region_name'] = user_pool_region

config = botocore.config.Config(signature_version=botocore.UNSIGNED)
boto3_client_kwargs['config'] = config

self.client = boto3.client('cognito-idp', **boto3_client_kwargs)

def get_keys(self):
Expand Down