/ opencodehub / src / pages / api / scim / v2 / ServiceProviderConfig.ts
Swadhin Biswas Feature/ai code reviewer (#73) · 8/2/2026
105a287
51 lines · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
 * SCIM 2.0 ServiceProviderConfig Endpoint
 * GET /api/scim/v2/ServiceProviderConfig
 */

import type { APIRoute } from "astro";

export const GET: APIRoute = async () => {
    const config = {
        schemas: ["urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"],
        documentationUri: "https://docs.opencodehub.space/administration/security/#scim-provisioning",
        patch: {
            supported: true,
        },
        bulk: {
            supported: false,
            maxOperations: 0,
            maxPayloadSize: 0,
        },
        filter: {
            supported: true,
            maxResults: 200,
        },
        changePassword: {
            supported: false,
        },
        sort: {
            supported: false,
        },
        etag: {
            supported: false,
        },
        authenticationSchemes: [
            {
                name: "OAuth Bearer Token",
                description: "Authentication via OAuth Bearer Token / Personal Access Token",
                specUri: "https://tools.ietf.org/html/rfc6750",
                type: "oauthbearertoken",
                primary: true,
            },
        ],
    };

    return new Response(JSON.stringify(config), {
        status: 200,
        headers: {
            "Content-Type": "application/scim+json",
        },
    });
};