Provider Agnostic Code
The Problem with Provider-Specific Code
# Provider-specific code - hard to migrate
# With Provider A
from provider_a import verify_token_a
user = verify_token_a(request.headers["Authorization"])
if user.permissions.get("admin"):
...
# With Provider B (different API)
from provider_b import decode_jwt
claims = decode_jwt(request.headers["Authorization"])
if "admin" in claims["roles"]:
...The GL IAM Solution
Same Endpoints, Different Providers
Unified User Object
Standard Role Mapping
Provider
Provider Role
GL IAM Standard Role
Benefits of Provider-Agnostic Code
Benefit
Description
Environment-Based Provider Selection
Last updated
Was this helpful?