Local server that gives you your OAuth 2.0 tokens needed to interact with the Conta Azul's API

Overview

What's this?

This is a django project meant to be run locally that gives you your OAuth 2.0 tokens needed to interact with Conta Azul's API

Prerequisites

Creating Your Conta Azul consumer application

First of all, if you haven't done this, before getting your tokens, you need to head over to https://portaldevs.contaazul.com/ and create an application. PLEASE NOTE THAT THE APPLICATION'S REDIRECT_URI SHOULD BE SET TO http://localhost:8000/auth/get-token FOR THIS SERVER TO WORK

Setting up environment variables

After your application is created, you will need to set the following environment variables How to set up environment variables:

  • CONTA_AZUL_CLIENT_ID: The value of this environment variable should match you application's client_id

  • HASHED_CONTA_AZUL_CLIENT_CREDENTIALS: This one is a bit trickier to set up right, but shouldn't take more than 2 minutes. What you need to do is to head over to https://www.base64encode.org/ and encode to base 64 the string made of your client id and secret separated by a colon: {client_id}:{client_secret}.
    Example: QsaiBIwQWJBcHTHHcQza:MhRFOTswQlzwJUzfOATW is UXNhaUJJd1FXSkJjSFRISGNRemE6TWhSRk9Uc3dRbHp3SlV6Zk9BVFc= once encoded.
    The encoded string should be the value of this environment variable

Installing Python and Django (Ignore if already installed in your machine)

As descbribed, the server is built with Django, so you will need to have Python and it's dependencies installed to run the server.
The simplest way to do this is to install python, open a terminal in the project's root folder, and run:
pip install requirements.txt
This will install Django, the requests lib, and django's dependencies. So you will be able to run the server

How to get your tokens?

Simply run the server through the terminal with python manage.py runserver, go to http://localhost:8000/auth/authorize, log into your conta azul account and click on "Autorizar". This will generate a file called token.json in the root of the project with your credentials.

If you have any doubts or need help regarding the API (after all, the official documentation on the authentication flow is subpar to say the least), please feel free to contact me through my email: [email protected]

Owner
Fábio David Freitas
Back-end/Web Developer
Fábio David Freitas
Generate payloads that force authentication against an attacker machine

Hashgrab Generates scf, url & lnk payloads to put onto a smb share. These force authentication to an attacker machine in order to grab hashes (for exa

xct 35 Dec 20, 2022
Mock authentication API that acceccpts email and password and returns authentication result.

Mock authentication API that acceccpts email and password and returns authentication result.

Herman Shpryhau 1 Feb 11, 2022
A Python package, that allows you to acquire your RecNet authorization bearer token with your account credentials!

RecNet-Login This is a Python package, that allows you to acquire your RecNet bearer token with your account credentials! Installation Done via git: p

Jesse 6 Aug 18, 2022
Django Rest Framework App wih JWT Authentication and other DRF stuff

Django Queries App with JWT authentication, Class Based Views, Serializers, Swagger UI, CI/CD and other cool DRF stuff API Documentaion /swagger - Swa

Rafael Salimov 4 Jan 29, 2022
Storefront - A store App developed using Django, RESTFul API, JWT

Storefront A store App developed using Django, RESTFul API, JWT. SQLite has been

Muhammad Algshy 1 Jan 07, 2022
REST implementation of Django authentication system.

djoser REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework views to handle basic actions such

Sunscrapers 2.2k Jan 01, 2023
JSON Web Token Authentication support for Django REST Framework

REST framework JWT Auth Notice This project is currently unmaintained. Check #484 for more details and suggested alternatives. JSON Web Token Authenti

José Padilla 3.2k Dec 31, 2022
Quick and simple security for Flask applications

Note This project is non maintained anymore. Consider the Flask-Security-Too project as an alternative. Flask-Security It quickly adds security featur

Matt Wright 1.6k Dec 19, 2022
Connect-4-AI - AI that plays Connect-4 using the minimax algorithm

Connect-4-AI Brief overview I coded up the Connect-4 (or four-in-a-row) game in

Favour Okeke 1 Feb 15, 2022
Extending the Django authentication system with a phone verification step.

Extending the Django authentication system with a phone verification step.

Miguel Grinberg 50 Dec 04, 2022
Login System Using Django

Login System Django

Nandini Chhajed 6 Dec 12, 2021
A host-guest based app in which host can CREATE the room. and guest can join room with room code and vote for song to skip. User is authenticated using Spotify API

A host-guest based app in which host can CREATE the room. and guest can join room with room code and vote for song to skip. User is authenticated using Spotify API

Aman Raj 5 May 10, 2022
Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.

Django Two-Factor Authentication Complete Two-Factor Authentication for Django. Built on top of the one-time password framework django-otp and Django'

Bouke Haarsma 1.3k Jan 04, 2023
A JSON Web Token authentication plugin for the Django REST Framework.

Simple JWT Abstract Simple JWT is a JSON Web Token authentication plugin for the Django REST Framework. For full documentation, visit django-rest-fram

Jazzband 3.2k Dec 29, 2022
Plotly Dash plugin to allow authentication through 3rd party OAuth providers.

dash-auth-external Integrate your dashboards with 3rd parties and external OAuth providers. Overview Do you want to build a Plotly Dash app which pull

James Holcombe 15 Dec 11, 2022
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic

OAuthLib - Python Framework for OAuth1 & OAuth2 *A generic, spec-compliant, thorough implementation of the OAuth request-signing logic for Python 3.5+

OAuthlib 2.5k Jan 02, 2023
Flask App With Login

Flask App With Login by FranciscoCharles Este projeto basico é o resultado do estudos de algumas funcionalidades do micro framework Flask do Python. O

Charles 3 Nov 14, 2021
Library - Recent and favorite documents

Thingy Thingy is used to quickly access recent and favorite documents. It's an XApp so it can work in any distribution and many desktop environments (

Linux Mint 23 Sep 11, 2022
Out-of-the-box support register, sign in, email verification and password recovery workflows for websites based on Django and MongoDB

Using djmongoauth What is it? djmongoauth provides out-of-the-box support for basic user management and additional operations including user registrat

hao 3 Oct 21, 2021
This Python based program checks your CC Stripe Auth 1$ Based Checker

CC-Checker This Python based program checks your CC Stripe Auth 1$ Based Checker About Author Coded by xBlackx Reach Me On Telegram @xBlackx_Coder jOI

xBlackxCoder 11 Nov 20, 2022