प्राप्याधिकारप्रवाहः। प्रतिदाबधर्मे (७ अक्टो) वेगः। अत्र अधिकारः कथं न्यास्यते। OAuth, OIDC, PKCE, scope। न सर्वगुह्यम्; न्यास्तधर्मः

English (minimizable)

After backpressure (7 Oct), this post covers OAuth 2 and OIDC: delegated access, auth code+PKCE, scopes, token TTL, redirects, validation, public vs confidential clients, consent, revocation and IAM/session links.

पूर्ण-शीर्षकम् / Full title

प्राप्याधिकारप्रवाहः: A Metrical Codification of OAuth and OIDC Flows (with English glosses)

English · overview and topics (minimizable)

What this post is about

OAuth 2 delegates API access with tokens. OIDC adds identity (ID token) on top. Both need strict redirect and validation rules.

Topics covered

  1. Why not passwords everywhere
  2. Auth code + PKCE vs implicit
  3. Least-privilege scopes
  4. Access/refresh lifetimes
  5. redirect_uri allow-lists and state
  6. ID token validation
  7. Public vs confidential clients
  8. Consent UX
  9. Revocation / introspection
  10. Links to IAM and sessions

Sanskrit title

प्राप्याधिकारप्रवाहः = prāpya-adhikāra-pravāhaḥ “flow of obtaining rights”.

English

Minimizable; Sanskrit-first.

परम्परा-सन्धिः / Series links
पूर्वं / Prior अत्र / Adds न पुनः / Does not repeat
पहिचानप्रवेशः (२१ जुलै) IAM core delegated token flows
सत्रधर्मः (३० सितम्बे) session cookies token session cousin
रहस्यप्रबन्धनम् (१९ जुलै) secrets client secrets
सहमतिलेखः (१३ जुलै) consent records OAuth consent UX
इदम् OAuth OIDC PKCE redirects -
ग्राह्य-त्याज्य-विवेकः / Keep and avoid

ग्राह्यम् / Keep

१. code+PKCE: public clients default
२. न्यूनscope: least scopes
३. ह्रस्वaccess: short access TTL
४. redirectallowlist: exact URI match
५. state/nonce: CSRF and replay guards
६. aud/iss/exp: validate claims
७. secretvault: confidential clients only on server

त्याज्यम् / Avoid

  • implicit flow for new apps
  • client_secret in mobile binary
  • skip aud/iss checks on JWT
अध्याय-योजना / Chapter plan
प्रकरणम् विषयः छन्दः श्लोकाः
मङ्गलं बीजं च / Opening अनुष्टुभ्
मूलतत्त्वानि / Core अनुष्टुभ्
मुख्यविधिः / Method उपजाति
रक्षा · विधिः / Guards अनुष्टुभ्
विवेक · सीमा / Judgment अनुष्टुभ्
पूर्वसन्धिः / Series links उपजाति
उपसंहारः / Close अनुष्टुभ्
पारिभाषिक-कोशः / Glossary
Modern English संस्कृतम् Note
OAuth प्राप्याधिकार / OAuth  
OIDC उद्घाटितपहिचानसन्धिः  
PKCE कोडप्रमाणकुञ्चिका  
access token प्रवेशटोकन्  
refresh token पुनर्नवीकरणटोकन्  
ID token पहिचानटोकन्  
scope विषयक्षेत्रम् / scope  
redirect URI प्रत्यावर्तनURI  
authorization server अधिकारसर्वरः  
resource server संसाधनसर्वरः  

श्लोकः १ (अनुष्टुभ्)

प्रत्येकं सेवास्यं गुह्यं मा धत्स्व जनस्य ।
प्राप्याधिकारप्रवाहस्तस्माद् न्यास्तप्रवेशः ॥१॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
प्रत्येकं सेवास्यं गुह्यं मा धत्स्व जनस्य । प्राप्याधिकारप्रवाहस्तस्माद् न्यास्तप्रवेशः ॥१॥

Word-for-word

संस्कृतपदम् Word-for-word English
प्रत्येकम् each
सेवा service
स्वम् own
गुह्यम् secret/password
मा धत्स्व do not hold
जनस्य of the user
प्राप्याधिकारप्रवाहः obtain-right flow
न्यास्तप्रवेशः entrusted entry

Gloss table

पदम् अर्थः / sense
सेवास्यं गुह्यम् password at every app
प्राप्याधिकारप्रवाहः OAuth/OIDC flow
न्यास्तप्रवेशः delegated access

English sense
OAuth and OpenID Connect let apps obtain limited access tokens or identity assertions without holding the user’s primary password everywhere.

Context / topic
Topic: why delegated auth exists.

वृत्तमिति: ८-८-८-८।

श्लोकः २ (अनुष्टुभ्)

authorization code + PKCE जनपक्षे श्रेयान् ।
implicit टोकन् URL भये ॥२॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
authorization code + PKCE जनपक्षे श्रेयान् । implicit टोकन् URL भये ॥२॥

Word-for-word

संस्कृतपदम् Word-for-word English
authorization authorization
code code
PKCE PKCE
जनपक्षे for public clients
श्रेयान् better
implicit implicit
टोकन् token
URL URL
भये in danger

Gloss table

पदम् अर्थः / sense
PKCE proof key for code exchange
implicit legacy implicit flow

English sense
For browser and mobile public clients prefer auth code with PKCE. Avoid implicit flow that parks tokens in URL fragments.

Context / topic
Topic: public client flows.

वृत्तमिति: ८-८-८-८।

श्लोकः ३ (अनुष्टुभ्)

scope न्यूनं देहि need-to-have ।
सर्वाधिकारटोकन् चोरस्य मिष्टम् ॥३॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
scope न्यूनं देहि need-to-have । सर्वाधिकारटोकन् चोरस्य मिष्टम् ॥३॥

Word-for-word

संस्कृतपदम् Word-for-word English
scope scope
न्यूनम् least
देहि give
need-to-have need-to-have
सर्वाधिकारटोकन् all-power token
चोरस्य of thief
मिष्टम् sweet

Gloss table

पदम् अर्थः / sense
scope न्यूनम् least privilege scopes
सर्वाधिकारटोकन् god token

English sense
Request and grant minimal scopes. Fat tokens with every permission magnify breach blast radius.

Context / topic
Topic: scope least privilege. Links to IAM.

वृत्तमिति: ८-८-८-८।

श्लोकः ४ (अनुष्टुभ्)

access ह्रस्वः refresh मितश्चक्रे ।
दीर्घaccess स्मृतिचौर्याय ॥४॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
access ह्रस्वः refresh मितश्चक्रे । दीर्घaccess स्मृतिचौर्याय ॥४॥

Word-for-word

संस्कृतपदम् Word-for-word English
access access
ह्रस्वः short
refresh refresh
मितः measured
चक्रे in rotation
दीर्घaccess long access
स्मृतिचौर्याय for memory theft

Gloss table

पदम् अर्थः / sense
access ह्रस्वः short access token
refresh मितः bounded refresh

English sense
Keep access tokens short-lived; rotate refresh tokens and detect reuse. This pairs with session dharma.

Context / topic
Topic: token lifetimes. Links to sessions.

वृत्तमिति: ८-८-८-८।

श्लोकः ५ (उपजाति)

redirect_uri श्वेतसूची दृढा
state CSRF रक्षतु ।
open redirect
चोरसेतुः ॥५॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
redirect_uri श्वेतसूची दृढा state CSRF रक्षतु । open redirect चोरसेतुः ॥५॥

Word-for-word

संस्कृतपदम् Word-for-word English
redirect_uri redirect_uri
श्वेतसूची allow-list
दृढा strict
state state
CSRF CSRF
रक्षतु must protect
open open
redirect redirect
चोरसेतुः thief bridge

Gloss table

पदम् अर्थः / sense
श्वेतसूची allow-list
open redirect open redirect

English sense
Allow-list redirect URIs exactly. Use state (and nonce for OIDC) against CSRF/login CSRF. Open redirects become token theft bridges.

Context / topic
Topic: redirect safety.

वृत्तमिति: एकादशाक्षराः पादाः।

श्लोकः ६ (अनुष्टुभ्)

ID टोकन् aud iss exp पठ्यताम् ।
अविचारितस्वीकृतिः मूढता ॥६॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
ID टोकन् aud iss exp पठ्यताम् । अविचारितस्वीकृतिः मूढता ॥६॥

Word-for-word

संस्कृतपदम् Word-for-word English
ID ID
टोकन् token
aud audience
iss issuer
exp expiry
पठ्यताम् must be validated
अविचारितस्वीकृतिः unchecked accept
मूढता folly

Gloss table

पदम् अर्थः / sense
aud iss exp audience issuer expiry
अविचारितस्वीकृतिः blind accept

English sense
Validate issuer, audience, signature, expiry and nonce on ID tokens. Never trust a JWT just because it parses.

Context / topic
Topic: OIDC token validation.

वृत्तमिति: ८-८-८-८।

श्लोकः ७ (अनुष्टुभ्)

client_secret कोशे न गिटे न SPA ।
public client भिद्यतां confidential ॥७॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
client_secret कोशे न गिटे न SPA । public client भिद्यतां confidential ॥७॥

Word-for-word

संस्कृतपदम् Word-for-word English
client_secret client secret
कोशे in vault
न गिटे not in git
न SPA not in SPA
public public
client client
भिद्यताम् must differ
confidential confidential

Gloss table

पदम् अर्थः / sense
client_secret client secret
public client SPA/native

English sense
Confidential clients keep secrets in servers/vaults. SPAs are public clients: no embedded client secrets.

Context / topic
Topic: public vs confidential clients. Links to secrets.

वृत्तमिति: ८-८-८-८।

श्लोकः ८ (अनुष्टुभ्)

consent पटलं स्पशं scopes दर्शयेत् ।
अन्धस्वीकृतिः विश्वासहानिः ॥८॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
consent पटलं स्पशं scopes दर्शयेत् । अन्धस्वीकृतिः विश्वासहानिः ॥८॥

Word-for-word

संस्कृतपदम् Word-for-word English
consent consent
पटलम् screen
स्पशम् clear
scopes scopes
दर्शयेत् should show
अन्धस्वीकृतिः blind OK
विश्वासहानिः trust loss

Gloss table

पदम् अर्थः / sense
consent पटलम् consent screen
अन्धस्वीकृतिः blind accept

English sense
Human-readable consent matters for third-party apps. Pair with your consent-record treatise for product privacy.

Context / topic
Topic: user consent UX. Links to consent post.

वृत्तमिति: ८-८-८-८।

श्लोकः ९ (अनुष्टुभ्)

revocation list introspection मितम् ।
हतटोकन् मा चिरं जीवतु ॥९॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
revocation list introspection मितम् । हतटोकन् मा चिरं जीवतु ॥९॥

Word-for-word

संस्कृतपदम् Word-for-word English
revocation revocation
list list
introspection introspection
मितम् measured
हतटोकन् killed token
मा चिरम् not long
जीवतु should live

Gloss table

पदम् अर्थः / sense
revocation revoke
introspection token introspection

English sense
Support logout/revoke paths and short access TTL so stolen tokens die quickly; introspect when needed at resource servers.

Context / topic
Topic: revocation.

वृत्तमिति: ८-८-८-८।

श्लोकः १० (उपजाति)

पहिचानप्रवेशः कः किं शक्नोति
सत्रं कदा स्मरति ।
प्रवाहः कथं
न्यासं लभते ॥१०॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
पहिचानप्रवेशः कः किं शक्नोति सत्रं कदा स्मरति । प्रवाहः कथं न्यासं लभते ॥१०॥

Word-for-word

संस्कृतपदम् Word-for-word English
पहिचानप्रवेशः IAM treatise
कः who
किम् what
शक्नोति can do
सत्रम् session
कदा when
स्मरति remembers
प्रवाहः flow
कथम् how
न्यासम् entrustment
लभते obtains

Gloss table

पदम् अर्थः / sense
पहिचानप्रवेशः IAM
न्यासम् delegation

English sense
IAM is who/what; session is remembering; OAuth/OIDC is how delegated tokens and identity assertions are obtained safely.

Context / topic
Topic: series triangle IAM/session/oauth.

सन्धिः: पहिचान कः; सत्रं कदा; प्रवाहः कथम्

वृत्तमिति: एकादशाक्षराः पादाः।

श्लोकः ११ (अनुष्टुभ्)

code+PKCE scope ह्रस्वत्वं redirect परीक्षा पञ्चकम् ।
एभिः प्राप्याधिकारप्रवाहो न्यास्तसत्यसमन्वितः ॥११॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
code+PKCE scope ह्रस्वत्वं redirect परीक्षा पञ्चकम् । एभिः प्राप्याधिकारप्रवाहो न्यास्तसत्यसमन्वितः ॥११॥

Word-for-word

संस्कृतपदम् Word-for-word English
code code
PKCE PKCE
scope scope
ह्रस्वत्वम् short life
redirect redirect
परीक्षा validation
पञ्चकम् five-set

Gloss table

पदम् अर्थः / sense
पञ्चकम् flow scope TTL redirect validate

English sense
Five limbs: safe code+PKCE (or confidential code), least scopes, short access tokens, strict redirects and full token validation.

Context / topic
Topic: checklist.

वृत्तमिति: ८-८-८-८।

श्लोकः १२ (अनुष्टुभ्)

इति प्राप्याधिकारप्रवाहसारो न्यास्तसत्यसमन्वितः ।
मितं न्यासं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
इति प्राप्याधिकारप्रवाहसारो न्यास्तसत्यसमन्वितः । मितं न्यासं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥

Word-for-word

संस्कृतपदम् Word-for-word English
इति thus
प्राप्याधिकारप्रवाहसारः OAuth-flow essence
न्यास्तसत्यम् entrusted truth
मितम् measured
न्यासम् delegation
क्रियायोग्यम् operable
तन्त्रधर्मः system dharma

Gloss table

पदम् अर्थः / sense
मितं न्यासम् measured delegation
तन्त्रधर्मः platform dharma

English sense
Closing: borrow only the rights you need for only as long as you need them.

Context / topic
Topic: close.

उपसंहारन्यायः: न्यूनं याचस्व; ह्रस्वं धारय; redirect बध्नाहि।

वृत्तमिति: ८-८-८-८।

श्लोकसूची / Verse index

१. Why OAuth
२. Code+PKCE
३. Scopes
४. TTL
५. Redirects
६. Validate tokens
७. Public/confidential
८. Consent
९. Revoke
१०. IAM/session link
११. Five limbs
१२. Close

सन्दर्भाः / References
  1. Prior: IAM 2026-07-21; sessions 2026-09-30; secrets 2026-07-19; consent 2026-07-13.
  2. Domain: OAuth2/OIDC integration patterns.
  3. English minimizable; Sanskrit-first.
  4. Style: no em dash; no Oxford comma in English clauses.