Skip to content

Instantly share code, notes, and snippets.

View omidraha's full-sized avatar
🦋
♥‿♥

Omid Raha omidraha

🦋
♥‿♥
View GitHub Profile
{
"clientId": "slack",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"https://slack.com/",
"https://slack.com/*"
],
@omidraha
omidraha / gist:8052f523222263ac3c6d3794208a7dab
Last active July 13, 2022 06:10 — forked from benbacardi/gist:227f924ec1d9bedd242b
Django reverse with a querystring
from django.utils.http import urlencode
def reverse_querystring(view, urlconf=None, args=None, kwargs=None, current_app=None, query_kwargs=None):
'''Custom reverse to handle query strings.
Usage:
reverse_querystring('app.views.my_view', kwargs={'pk': 123}, query_kwargs={'search': 'Bob'})
'''
base_url = reverse(view, urlconf=urlconf, args=args, kwargs=kwargs, current_app=current_app)
if query_kwargs:
return '{}?{}'.format(base_url, urlencode(query_kwargs))
@omidraha
omidraha / README.md
Last active November 19, 2022 21:27 — forked from andineck/README.md
Authentication and Authorization Concepts for MicroServices

auth with microservices

Authorization and Authentication are hard. when you only have to implement them once (as you do within a monolith) instead of over and over again, it makes the developer happy :-), and maybe leads to less implementation failures.

When you have a bunch of microservices, this is something that has to be considered.

Implement it once or in every microservice, or something in between?