You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before OAuth 2.0 authentication can work, the **OAuth administrator must register the redirect URI** (callback URL) in the OAuth provider's application configuration. YASGUI uses the current page URL as the redirect URI by default (e.g., `https://yasgui.example.com/`). This URL must be added to the list of allowed redirect URIs in your OAuth application settings.
4.**Enter credentials** based on your selected type (see below)
722
+
5.**Click "Save"** (or "Save & Authenticate" for OAuth 2.0) to apply
723
+
724
+
**Authentication Types:**
725
+
726
+
*HTTP Basic Authentication:*
727
+
- Username: Your endpoint username
728
+
- Password: Your endpoint password
729
+
- Use case: Simple username/password authentication
730
+
731
+
*Bearer Token:*
732
+
- Token: Your pre-configured bearer token
733
+
- Use case: When you have a pre-generated access token
734
+
735
+
*API Key (Custom Header):*
736
+
- Header Name: The HTTP header name (e.g., X-API-Key)
737
+
- API Key: Your API key value
738
+
- Use case: Endpoints using custom header-based authentication
739
+
740
+
*OAuth 2.0:*
741
+
- Client ID: Your OAuth application's client ID
742
+
- Authorization Endpoint: The OAuth provider's authorization URL
743
+
- Token Endpoint: The OAuth provider's token exchange URL
744
+
- Redirect URI: Callback URL (optional, defaults to current page)
745
+
- Scope: Space-separated OAuth scopes (optional)
746
+
- Use case: Secure, industry-standard authorization with automatic token refresh
747
+
-**Process**: Click "Save & Authenticate" to open OAuth login window
748
+
-**⚠️ Important**: The redirect URI must be registered with your OAuth provider by the OAuth administrator before authentication will work
721
749
722
750
**Security Considerations:**
723
751
724
752
⚠️ **Important Security Notes:**
725
753
726
-
-**Credentials are stored in browser localStorage**: Your username and password are stored locally in your browser
754
+
-**Credentials are stored in browser localStorage**: Your authentication credentials are stored locally in your browser
727
755
-**Only use with HTTPS endpoints**: Never send credentials to HTTP endpoints as they will be transmitted in plain text
728
756
-**Be cautious on shared computers**: Clear your browser data when using YASGUI on shared or public computers
757
+
-**OAuth 2.0 tokens**: Access tokens are automatically refreshed when expired (if refresh token is available)
758
+
-**Token security**: OAuth 2.0 uses secure PKCE flow (Proof Key for Code Exchange) for enhanced security
729
759
730
760
**How Authentication Works:**
731
761
@@ -735,10 +765,57 @@ Authentication is stored per-endpoint, which means:
735
765
- Credentials persist across browser sessions (stored in localStorage)
736
766
737
767
When authentication is configured:
768
+
769
+
For **Basic Authentication**:
738
770
1. YASGUI encodes your credentials using Base64 encoding
739
771
2. Adds an `Authorization` header with the format: `Basic <encoded-credentials>`
740
772
3. Sends this header with every SPARQL query request to that endpoint
741
773
774
+
For **Bearer Token**:
775
+
1. Uses the provided token as-is
776
+
2. Adds an `Authorization` header with the format: `Bearer <token>`
777
+
3. Sends this header with every SPARQL query request to that endpoint
778
+
779
+
For **API Key**:
780
+
1. Uses the specified custom header name and API key value
781
+
2. Adds a custom header with the format: `<Header-Name>: <api-key>`
782
+
3. Sends this header with every SPARQL query request to that endpoint
783
+
784
+
For **OAuth 2.0**:
785
+
1. Opens a popup window for OAuth provider authentication
786
+
2. Uses Authorization Code flow with PKCE for secure token exchange
787
+
3. Stores access token and refresh token
788
+
4. Automatically checks token expiration before each query
789
+
5. Automatically refreshes expired tokens using refresh token (if available)
790
+
6. Adds an `Authorization` header with the format: `Bearer <access-token>`
791
+
7. If token refresh fails, prompts user to re-authenticate
792
+
793
+
**OAuth 2.0 Provider Examples:**
794
+
795
+
**⚠️ Important Prerequisite:**
796
+
Before using OAuth 2.0, the OAuth administrator must register the redirect URI (callback URL) in the OAuth provider's configuration. By default, YASGUI uses the current page URL as the redirect URI. For example, if YASGUI is hosted at `https://yasgui.example.com/`, this URL must be added to the allowed redirect URIs in your OAuth application settings.
0 commit comments