register_oidc_config
¶
register_oidc_config(
network_id: NetworkId,
company_id: GenericString,
issuer: GenericString,
scopes: GenericString,
*,
config_overrides: Optional[WickrClientConfig] = None,
custom_username: Optional[GenericString] = None,
extra_auth_params: Optional[GenericString] = None,
secret: Optional[SensitiveString] = None,
sso_token_buffer_minutes: Optional[int] = None,
user_id: Optional[GenericString] = None,
) -> RegisterOidcConfigResponse
Registers and saves an OpenID Connect (OIDC) configuration for a Wickr network, enabling Single Sign-On (SSO) authentication through an identity provider.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network for which OIDC will be configured.
-
company_id(GenericString) –Custom identifier your end users will use to sign in with SSO.
-
custom_username(Optional[GenericString], default:None) –A custom field mapping to extract the username from the OIDC token (optional).
The customUsername is only required if you use something other than email as the username field.
-
extra_auth_params(Optional[GenericString], default:None) –Additional authentication parameters to include in the OIDC flow (optional).
-
issuer(GenericString) –The issuer URL of the OIDC provider (e.g., 'https://login.example.com').
-
scopes(GenericString) –The OAuth scopes to request from the OIDC provider (e.g., 'openid profile email').
-
secret(Optional[SensitiveString], default:None) –The client secret for authenticating with the OIDC provider (optional).
-
sso_token_buffer_minutes(Optional[int], default:None) –The buffer time in minutes before the SSO token expires to refresh it (optional).
-
user_id(Optional[GenericString], default:None) –Unique identifier provided by your identity provider to authenticate the access request. Also referred to as clientID.
Raises:
-
BadRequestError–The request was invalid or malformed. This error occurs when the request parameters do not meet the API requirements, such as invalid field values, missing required parameters, or improperly formatted data.
-
ForbiddenError–Access to the requested resource is forbidden. This error occurs when the authenticated user does not have the necessary permissions to perform the requested operation, even though they are authenticated.
-
InternalServerError–An unexpected error occurred on the server while processing the request. This indicates a problem with the Wickr service itself rather than with the request. If this error persists, contact Amazon Web Services Support.
-
RateLimitError–The request was throttled because too many requests were sent in a short period of time. Wait a moment and retry the request. Consider implementing exponential backoff in your application.
-
ResourceNotFoundError–The requested resource could not be found. This error occurs when you try to access or modify a network, user, bot, security group, or other resource that doesn't exist or has been deleted.
-
UnauthorizedError–The request was not authenticated or the authentication credentials were invalid. This error occurs when the request lacks valid authentication credentials or the credentials have expired.
-
ValidationError–One or more fields in the request failed validation. This error provides detailed information about which fields were invalid and why, allowing you to correct the request and retry.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Save OIDC config successfully
>>> client.register_oidc_config(network_id='12345678', company_id='us-east-1-company123', issuer='https://login.example.com', scopes='openid profile email', user_id='email', sso_token_buffer_minutes=5)
Save OIDC config - missing company ID
>>> client.register_oidc_config(network_id='12345678', company_id='', issuer='https://login.example.com', scopes='openid profile email')
Save OIDC config - invalid company ID prefix
>>> client.register_oidc_config(network_id='12345678', company_id='invalid-company123', issuer='https://login.example.com', scopes='openid profile email')
Source code in docs_src/capo_wickr/_services/wickr.py
3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 | |