getOidcInfo method

Future<GetOidcInfoResponse> getOidcInfo({
  1. required String networkId,
  2. String? certificate,
  3. String? clientId,
  4. String? clientSecret,
  5. String? code,
  6. String? codeVerifier,
  7. String? grantType,
  8. String? redirectUri,
  9. String? url,
})

Retrieves the OpenID Connect (OIDC) configuration for a Wickr network, including SSO settings and optional token information if access token parameters are provided.

May throw BadRequestError. May throw ForbiddenError. May throw InternalServerError. May throw RateLimitError. May throw ResourceNotFoundError. May throw UnauthorizedError. May throw ValidationError.

Parameter networkId : The ID of the Wickr network whose OIDC configuration will be retrieved.

Parameter certificate : The CA certificate for secure communication with the OIDC provider (optional).

Parameter clientId : The OAuth client ID for retrieving access tokens (optional).

Parameter clientSecret : The OAuth client secret for retrieving access tokens (optional).

Parameter code : The authorization code for retrieving access tokens (optional).

Parameter codeVerifier : The PKCE code verifier for enhanced security in the OAuth flow (optional).

Parameter grantType : The OAuth grant type for retrieving access tokens (optional).

Parameter redirectUri : The redirect URI for the OAuth flow (optional).

Parameter url : The URL for the OIDC provider (optional).

Implementation

Future<GetOidcInfoResponse> getOidcInfo({
  required String networkId,
  String? certificate,
  String? clientId,
  String? clientSecret,
  String? code,
  String? codeVerifier,
  String? grantType,
  String? redirectUri,
  String? url,
}) async {
  final $query = <String, List<String>>{
    if (certificate != null) 'certificate': [certificate],
    if (clientId != null) 'clientId': [clientId],
    if (clientSecret != null) 'clientSecret': [clientSecret],
    if (code != null) 'code': [code],
    if (codeVerifier != null) 'codeVerifier': [codeVerifier],
    if (grantType != null) 'grantType': [grantType],
    if (redirectUri != null) 'redirectUri': [redirectUri],
    if (url != null) 'url': [url],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/networks/${Uri.encodeComponent(networkId)}/oidc',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetOidcInfoResponse.fromJson(response);
}