Step 1: Choose OAuth Library

The first step in integrating Oten IDP is selecting the right OAuth 2.0 / OpenID Connect library for your technology stack. IMPORTANT: Your chosen library must support JAR (JWT-Secured Authorization Request) as Oten IDP requires it for all authorization requests.

Can't implement JAR? If your application cannot support JAR due to technical constraints, contact [email protected]envelope to discuss enabling traditional OAuth flow as a temporary solution.

๐Ÿ“– Need the big picture? Check out the Integration Flow Overview to understand how this step fits into the complete process.

๐ŸŽฏ What You'll Learn

In this step, you will:

  • Understand JAR (JWT-Secured Authorization Request) requirements

  • Choose libraries that support JAR and JWT signing

  • Install and configure your chosen library with JAR support

  • Understand the trade-offs between different options

๐Ÿšจ JAR Requirement - CRITICAL

Oten IDP requires JAR (JWT-Secured Authorization Request) for ALL authorization requests. Your chosen library must support:

Required JAR Features

  • โœ… JWT Creation and Signing (RS256, HS256, or EdDSA)

  • โœ… Custom JWT Claims (ability to add OAuth parameters to JWT payload)

  • โœ… Key Management (RSA keys for RS256 or client secret for HS256)

  • โœ… Request Parameter Support (sending JWT in request parameter)

โŒ Libraries That Won't Work

Libraries that only support traditional OAuth query parameters will NOT work with Oten IDP:

โœ… What You Need

Libraries that can create signed JWTs and send them in the request parameter:

๐Ÿ“š Library Categories

Official vs Third-Party Libraries

Official Libraries

  • Maintained by platform vendors (Google, Microsoft, etc.)

  • Well-documented and supported

  • Regular security updates

  • Best practices built-in

  • May need custom JAR implementation

Third-Party Libraries

  • Community-maintained

  • Often more flexible

  • May have additional features

  • Varying quality and support levels

  • Check JAR support before choosing

Oten Official Libraries

  • Specifically designed for Oten IDP

  • Built-in JAR support

  • Optimized for Oten features

  • Direct support from Oten team

Client Type Considerations

Confidential Clients (Server-Side)

  • Can securely store client secrets

  • Token exchange happens on server

  • More security options available

  • Examples: Web servers, APIs, backend services

Public Clients (Client-Side)

  • Cannot store secrets securely

  • Must use PKCE for security

  • Tokens handled in browser/device

  • Examples: SPAs, mobile apps, desktop apps

๐Ÿ› ๏ธ Technology-Specific Recommendations

JavaScript/Node.js

For Server-Side (Node.js)

openid-client - Most comprehensive

For Client-Side (Browser/SPA)

oidc-client-ts - Standards compliant

Python

Authlib - Modern and comprehensive

Java

Spring Security OAuth2

Alternative: pac4j

C#/.NET

OpenID Connect Authentication

PHP

League OAuth2 Client

Go

Oten go-oauth - Official library with JAR support

Key Features of Oten go-oauth:

  • โœ… Built-in JAR Support: Automatically creates and signs JWT authorization requests

  • โœ… Multiple Signing Methods: Supports RS256 (RSA) and HS256 (HMAC) algorithms

  • โœ… PKCE Integration: Automatic PKCE generation for public clients

  • โœ… Token Management: Built-in token refresh and validation

  • โœ… JWKS Support: Automatic public key publishing

  • โœ… Oten Optimized: Designed specifically for Oten IDP features

Alternative: Standard Library (Requires Custom JAR Implementation)

Manual JAR Implementation with Standard Library

Recommendation: Use the Oten go-oauth library as it handles all JAR complexity automatically and is specifically designed for Oten IDP.

Oten go-oauth Library Details

The Oten go-oauth library provides comprehensive OAuth 2.0 and OpenID Connect support with built-in JAR functionality:

Installation:

Key Components:

  • client package: Main OAuth client with JAR support

  • jar package: JWT-Secured Authorization Request implementation

  • token package: Token management and validation

  • jwks package: JSON Web Key Set handling

Complete Example:

Advanced Features:

Ruby

OmniAuth

๐Ÿ” Library Selection Criteria

JAR Support (CRITICAL for Oten IDP)

MUST HAVE features for Oten IDP integration:

  • โœ… JWT Creation and Signing (RS256, HS256, or EdDSA algorithms)

  • โœ… Custom JWT Claims (ability to embed OAuth parameters in JWT payload)

  • โœ… Request Parameter Support (sending JWT in request parameter)

  • โœ… Key Management (RSA private keys or client secrets)

  • โœ… JWKS Integration (for public key distribution)

Security Features

Look for libraries that support:

  • JAR (JWT-Secured Authorization Request) - REQUIRED for Oten

  • PKCE (essential for public clients)

  • State parameter validation (CSRF protection)

  • Nonce support (replay attack prevention)

  • JWT validation (signature verification)

  • Token refresh (automatic renewal)

Standards Compliance

Ensure the library supports:

  • JAR RFC 9101 - CRITICAL for Oten IDP

  • OAuth 2.0 RFC 6749

  • OpenID Connect Core 1.0

  • PKCE RFC 7636 (for public clients)

  • JWT RFC 7519

  • JWKS RFC 7517 (for key distribution)

Oten Specific Features

Preferred libraries should support:

  • Oten endpoints (pre-configured)

  • Multi-tenant workspace selection

  • Oten specific scopes

  • Built-in error handling for Oten responses

Maintenance and Support

Consider:

  • Active development (recent commits)

  • Security updates (vulnerability patches)

  • Documentation quality

  • Community support

  • Issue response time

  • Oten compatibility (if available)

๐Ÿ“ฆ Installation Examples

Package Managers

npm (Node.js)

pip (Python)

Maven (Java)

NuGet (.NET)

โš™๏ธ Configuration Basics

Environment Variables

Set up your configuration securely:

Basic Configuration Structure with JAR

Most libraries need to be configured for JAR support:

JAR-Specific Configuration

Since Oten IDP requires JAR, you'll need additional setup:

๐Ÿ”ง Testing Your Library Choice

Quick Test Setup for JAR Support

  1. Install the library

  2. Set up JAR configuration (private key, JWKS endpoint)

  3. Create a simple JAR authorization request

  4. Test the JWT creation and signing

  5. Verify the authorization URL format

  6. Test the complete OAuth flow

JAR Testing Checklist

General Validation Checklist

Test JAR Implementation


Progress: Step 1 of 5 complete โœ…

Last updated