@adcp/sdk API Reference - v7.9.0
    Preparing search index...

    Interface AuthorizationRequirements

    Structured description of what an agent's authorization server requires before it will accept a tools/call. Produced by discoverAuthorizationRequirements.

    interface AuthorizationRequirements {
        agentUrl: string;
        resource?: string;
        resourceMetadataUrl?: string;
        authorizationServer?: string;
        authorizationServers?: string[];
        authorizationEndpoint?: string;
        tokenEndpoint?: string;
        registrationEndpoint?: string;
        scopesSupported?: string[];
        grantTypesSupported?: string[];
        metadataSource?: "rfc-8414" | "openid-configuration";
        challengeScope?: string;
        challenge: WWWAuthenticateChallenge;
    }
    Index

    Properties

    agentUrl: string

    The agent URL we probed.

    resource?: string

    Resource URL the agent advertises in its WWW-Authenticate / PRM (RFC 9728).

    resourceMetadataUrl?: string

    URL of the protected-resource-metadata document (from WWW-Authenticate: resource_metadata=…).

    authorizationServer?: string

    First authorization_servers[0] from the protected-resource metadata.

    authorizationServers?: string[]

    All authorization_servers advertised by the PRM, in declaration order. The walker only probes [0] (PRM preference order — see RFC 9728 §3.3); the full list is exposed so callers can surface multi-issuer deployments in diagnostics. A length > 1 is uncommon and worth flagging to the operator — typically a federation partner or a staged migration.

    authorizationEndpoint?: string

    authorization_endpoint from the authorization-server metadata (RFC 8414).

    tokenEndpoint?: string

    token_endpoint from the authorization-server metadata.

    registrationEndpoint?: string

    registration_endpoint if the AS supports RFC 7591 dynamic client registration.

    scopesSupported?: string[]

    Scopes advertised by the AS (RFC 8414 scopes_supported).

    grantTypesSupported?: string[]

    grant_types_supported advertised by the AS (RFC 8414). undefined when the AS didn't publish the field — per RFC 8414 that defaults to ["authorization_code", "implicit"]. Clients should treat absence as "unknown, try your grant and see," not as proof the grant is unsupported.

    metadataSource?: "rfc-8414" | "openid-configuration"

    True when the AS metadata came from the OIDC fallback URL rather than RFC 8414.

    challengeScope?: string

    Scope hinted in the WWW-Authenticate challenge's scope auth-param.

    Raw parsed challenge the agent returned on the 401.