kinde_sdk 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/kinde_sdk/auth_controller.rb +133 -67
- data/app/helpers/auth_helper.rb +88 -0
- data/config/routes.rb +3 -1
- data/kinde_api/Gemfile +9 -0
- data/kinde_api/README.md +316 -47
- data/kinde_api/Rakefile +10 -0
- data/kinde_api/docs/APIsApi.md +569 -60
- data/kinde_api/docs/AddAPIScopeRequest.md +20 -0
- data/kinde_api/docs/AddAPIsRequest.md +4 -4
- data/kinde_api/docs/AddOrganizationUsersRequestUsersInner.md +1 -1
- data/kinde_api/docs/AddRoleScopeRequest.md +18 -0
- data/kinde_api/docs/AddRoleScopeResponse.md +20 -0
- data/kinde_api/docs/ApplicationsApi.md +465 -38
- data/kinde_api/docs/AuthorizeAppApiResponse.md +24 -0
- data/kinde_api/docs/BillingAgreementsApi.md +157 -0
- data/kinde_api/docs/BillingEntitlementsApi.md +89 -0
- data/kinde_api/docs/BillingMeterUsageApi.md +77 -0
- data/kinde_api/docs/BusinessApi.md +27 -66
- data/kinde_api/docs/CallbacksApi.md +25 -25
- data/kinde_api/docs/Category.md +20 -0
- data/kinde_api/docs/ConnectedAppsApi.md +8 -8
- data/kinde_api/docs/Connection.md +22 -0
- data/kinde_api/docs/ConnectionConnection.md +24 -0
- data/kinde_api/docs/ConnectionsApi.md +439 -0
- data/kinde_api/docs/CreateApiScopesResponse.md +22 -0
- data/kinde_api/docs/CreateApiScopesResponseScope.md +18 -0
- data/kinde_api/docs/CreateApisResponse.md +22 -0
- data/kinde_api/docs/CreateApisResponseApi.md +18 -0
- data/kinde_api/docs/CreateApplicationRequest.md +3 -3
- data/kinde_api/docs/CreateApplicationResponseApplication.md +4 -4
- data/kinde_api/docs/CreateBillingAgreementRequest.md +24 -0
- data/kinde_api/docs/CreateCategoryRequest.md +20 -0
- data/kinde_api/docs/CreateCategoryResponse.md +22 -0
- data/kinde_api/docs/CreateCategoryResponseCategory.md +18 -0
- data/kinde_api/docs/CreateConnectionRequest.md +28 -0
- data/kinde_api/docs/CreateConnectionRequestOptions.md +51 -0
- data/kinde_api/docs/CreateConnectionRequestOptionsOneOf.md +22 -0
- data/kinde_api/docs/CreateConnectionRequestOptionsOneOf1.md +34 -0
- data/kinde_api/docs/CreateConnectionRequestOptionsOneOf2.md +44 -0
- data/kinde_api/docs/CreateConnectionResponse.md +22 -0
- data/kinde_api/docs/CreateConnectionResponseConnection.md +18 -0
- data/kinde_api/docs/CreateEnvironmentVariableRequest.md +22 -0
- data/kinde_api/docs/CreateEnvironmentVariableResponse.md +22 -0
- data/kinde_api/docs/CreateEnvironmentVariableResponseEnvironmentVariable.md +18 -0
- data/kinde_api/docs/CreateIdentityResponse.md +22 -0
- data/kinde_api/docs/CreateIdentityResponseIdentity.md +18 -0
- data/kinde_api/docs/CreateMeterUsageRecordRequest.md +26 -0
- data/kinde_api/docs/CreateMeterUsageRecordResponse.md +20 -0
- data/kinde_api/docs/CreateOrganizationRequest.md +17 -7
- data/kinde_api/docs/CreateOrganizationResponse.md +4 -4
- data/kinde_api/docs/CreateOrganizationResponseOrganization.md +4 -2
- data/kinde_api/docs/CreatePropertyRequest.md +30 -0
- data/kinde_api/docs/CreatePropertyResponse.md +22 -0
- data/kinde_api/docs/CreatePropertyResponseProperty.md +18 -0
- data/kinde_api/docs/CreateRolesResponse.md +22 -0
- data/kinde_api/docs/CreateRolesResponseRole.md +18 -0
- data/kinde_api/docs/CreateUserIdentityRequest.md +24 -0
- data/kinde_api/docs/CreateUserRequest.md +3 -1
- data/kinde_api/docs/CreateUserRequestIdentitiesInner.md +3 -1
- data/kinde_api/docs/CreateUserRequestIdentitiesInnerDetails.md +7 -1
- data/kinde_api/docs/CreateUserRequestProfile.md +3 -1
- data/kinde_api/docs/CreateUserResponse.md +1 -1
- data/kinde_api/docs/CreateWebHookRequest.md +24 -0
- data/kinde_api/docs/CreateWebhookResponse.md +22 -0
- data/kinde_api/docs/CreateWebhookResponseWebhook.md +20 -0
- data/kinde_api/docs/DeleteApiResponse.md +20 -0
- data/kinde_api/docs/DeleteEnvironmentVariableResponse.md +20 -0
- data/kinde_api/docs/DeleteRoleScopeResponse.md +20 -0
- data/kinde_api/docs/DeleteWebhookResponse.md +20 -0
- data/kinde_api/docs/EnvironmentVariable.md +26 -0
- data/kinde_api/docs/EnvironmentVariablesApi.md +356 -0
- data/kinde_api/docs/EnvironmentsApi.md +281 -5
- data/kinde_api/docs/EventType.md +26 -0
- data/kinde_api/docs/FeatureFlagsApi.md +4 -4
- data/kinde_api/docs/GetApiResponse.md +22 -0
- data/kinde_api/docs/GetApiResponseApi.md +28 -0
- data/kinde_api/docs/GetApiResponseApiApplicationsInner.md +24 -0
- data/kinde_api/docs/GetApiResponseApiScopesInner.md +20 -0
- data/kinde_api/docs/GetApiScopeResponse.md +22 -0
- data/kinde_api/docs/GetApiScopesResponse.md +22 -0
- data/kinde_api/docs/GetApiScopesResponseScopesInner.md +22 -0
- data/kinde_api/docs/GetApisResponse.md +24 -0
- data/kinde_api/docs/GetApisResponseApisInner.md +26 -0
- data/kinde_api/docs/GetApisResponseApisInnerScopesInner.md +20 -0
- data/kinde_api/docs/GetApplicationResponseApplication.md +11 -5
- data/kinde_api/docs/GetBillingAgreementsResponse.md +24 -0
- data/kinde_api/docs/GetBillingAgreementsResponseAgreementsInner.md +26 -0
- data/kinde_api/docs/GetBillingAgreementsResponseAgreementsInnerEntitlementsInner.md +20 -0
- data/kinde_api/docs/GetBillingEntitlementsResponse.md +26 -0
- data/kinde_api/docs/GetBillingEntitlementsResponseEntitlementsInner.md +32 -0
- data/kinde_api/docs/GetBillingEntitlementsResponsePlansInner.md +20 -0
- data/kinde_api/docs/GetBusinessResponse.md +22 -0
- data/kinde_api/docs/GetBusinessResponseBusiness.md +38 -0
- data/kinde_api/docs/GetCategoriesResponse.md +24 -0
- data/kinde_api/docs/GetConnectionsResponse.md +24 -0
- data/kinde_api/docs/GetEnvironmentResponse.md +22 -0
- data/kinde_api/docs/GetEnvironmentResponseEnvironment.md +68 -0
- data/kinde_api/docs/GetEnvironmentResponseEnvironmentBackgroundColor.md +22 -0
- data/kinde_api/docs/GetEnvironmentResponseEnvironmentLinkColor.md +22 -0
- data/kinde_api/docs/GetEnvironmentVariableResponse.md +22 -0
- data/kinde_api/docs/GetEnvironmentVariablesResponse.md +24 -0
- data/kinde_api/docs/GetEventResponse.md +22 -0
- data/kinde_api/docs/GetEventResponseEvent.md +26 -0
- data/kinde_api/docs/GetEventTypesResponse.md +22 -0
- data/kinde_api/docs/GetIdentitiesResponse.md +24 -0
- data/kinde_api/docs/GetIndustriesResponse.md +22 -0
- data/kinde_api/docs/GetIndustriesResponseIndustriesInner.md +20 -0
- data/kinde_api/docs/GetOrganizationResponse.md +72 -0
- data/kinde_api/docs/GetOrganizationResponseBilling.md +20 -0
- data/kinde_api/docs/GetOrganizationResponseBillingAgreementsInner.md +20 -0
- data/kinde_api/docs/GetOrganizationUsersResponse.md +2 -2
- data/kinde_api/docs/GetOrganizationsResponse.md +4 -4
- data/kinde_api/docs/GetPropertiesResponse.md +24 -0
- data/kinde_api/docs/GetPropertyValuesResponse.md +24 -0
- data/kinde_api/docs/GetRoleResponse.md +22 -0
- data/kinde_api/docs/GetRoleResponseRole.md +26 -0
- data/kinde_api/docs/GetTimezonesResponse.md +22 -0
- data/kinde_api/docs/GetTimezonesResponseTimezonesInner.md +20 -0
- data/kinde_api/docs/GetUserMfaResponse.md +22 -0
- data/kinde_api/docs/GetUserMfaResponseMfa.md +30 -0
- data/kinde_api/docs/GetUserSessionsResponse.md +24 -0
- data/kinde_api/docs/GetUserSessionsResponseSessionsInner.md +40 -0
- data/kinde_api/docs/GetWebhooksResponse.md +22 -0
- data/kinde_api/docs/IdentitiesApi.md +219 -0
- data/kinde_api/docs/Identity.md +34 -0
- data/kinde_api/docs/IndustriesApi.md +14 -21
- data/kinde_api/docs/LogoutRedirectUrls.md +6 -2
- data/kinde_api/docs/MFAApi.md +77 -0
- data/kinde_api/docs/NotFoundResponse.md +18 -0
- data/kinde_api/docs/NotFoundResponseErrors.md +20 -0
- data/kinde_api/docs/OAuthApi.md +32 -97
- data/kinde_api/docs/OrganizationItemSchema.md +28 -0
- data/kinde_api/docs/OrganizationUser.md +17 -11
- data/kinde_api/docs/OrganizationsApi.md +1440 -210
- data/kinde_api/docs/Permissions.md +1 -1
- data/kinde_api/docs/PermissionsApi.md +7 -7
- data/kinde_api/docs/PropertiesApi.md +297 -0
- data/kinde_api/docs/Property.md +28 -0
- data/kinde_api/docs/PropertyCategoriesApi.md +227 -0
- data/kinde_api/docs/PropertyValue.md +26 -0
- data/kinde_api/docs/ReadEnvLogoResponse.md +22 -0
- data/kinde_api/docs/ReadEnvLogoResponseLogosInner.md +20 -0
- data/kinde_api/docs/ReadLogoResponse.md +22 -0
- data/kinde_api/docs/ReadLogoResponseLogosInner.md +22 -0
- data/kinde_api/docs/ReplaceConnectionRequest.md +24 -0
- data/kinde_api/docs/ReplaceConnectionRequestOptions.md +51 -0
- data/kinde_api/docs/ReplaceConnectionRequestOptionsOneOf.md +32 -0
- data/kinde_api/docs/ReplaceConnectionRequestOptionsOneOf1.md +40 -0
- data/kinde_api/docs/ReplaceMFARequest.md +20 -0
- data/kinde_api/docs/ReplaceOrganizationMFARequest.md +18 -0
- data/kinde_api/docs/RolePermissionsResponse.md +24 -0
- data/kinde_api/docs/RoleScopesResponse.md +22 -0
- data/kinde_api/docs/Roles.md +4 -2
- data/kinde_api/docs/RolesApi.md +338 -54
- data/kinde_api/docs/Scopes.md +24 -0
- data/kinde_api/docs/SearchApi.md +89 -0
- data/kinde_api/docs/SearchUsersResponse.md +22 -0
- data/kinde_api/docs/SearchUsersResponseResultsInner.md +46 -0
- data/kinde_api/docs/SetUserPasswordRequest.md +26 -0
- data/kinde_api/docs/SubscribersApi.md +4 -4
- data/kinde_api/docs/SuccessResponse.md +2 -2
- data/kinde_api/docs/TimezonesApi.md +14 -21
- data/kinde_api/docs/TokenIntrospect.md +5 -5
- data/kinde_api/docs/UpdateAPIApplicationsRequestApplicationsInner.md +4 -4
- data/kinde_api/docs/UpdateAPIScopeRequest.md +18 -0
- data/kinde_api/docs/UpdateApplicationRequest.md +5 -1
- data/kinde_api/docs/UpdateApplicationTokensRequest.md +26 -0
- data/kinde_api/docs/UpdateApplicationsPropertyRequest.md +18 -0
- data/kinde_api/docs/UpdateApplicationsPropertyRequestValue.md +49 -0
- data/kinde_api/docs/UpdateBusinessRequest.md +36 -0
- data/kinde_api/docs/UpdateCategoryRequest.md +18 -0
- data/kinde_api/docs/UpdateConnectionRequest.md +24 -0
- data/kinde_api/docs/UpdateEnvironmentVariableRequest.md +22 -0
- data/kinde_api/docs/UpdateEnvironmentVariableResponse.md +20 -0
- data/kinde_api/docs/UpdateIdentityRequest.md +18 -0
- data/kinde_api/docs/UpdateOrganizationPropertiesRequest.md +18 -0
- data/kinde_api/docs/UpdateOrganizationRequest.md +27 -15
- data/kinde_api/docs/UpdateOrganizationSessionsRequest.md +24 -0
- data/kinde_api/docs/UpdateOrganizationUsersRequestUsersInner.md +2 -2
- data/kinde_api/docs/UpdateOrganizationUsersResponse.md +3 -1
- data/kinde_api/docs/UpdatePropertyRequest.md +24 -0
- data/kinde_api/docs/UpdateUserRequest.md +5 -1
- data/kinde_api/docs/UpdateUserResponse.md +1 -1
- data/kinde_api/docs/UpdateWebHookRequest.md +22 -0
- data/kinde_api/docs/UpdateWebhookResponse.md +22 -0
- data/kinde_api/docs/UpdateWebhookResponseWebhook.md +18 -0
- data/kinde_api/docs/User.md +6 -2
- data/kinde_api/docs/UserProfileV2.md +17 -13
- data/kinde_api/docs/UsersApi.md +893 -99
- data/kinde_api/docs/UsersResponseUsersInner.md +6 -2
- data/kinde_api/docs/Webhook.md +28 -0
- data/kinde_api/docs/WebhooksApi.md +423 -0
- data/kinde_api/git_push.sh +57 -0
- data/kinde_api/kinde_api.gemspec +38 -0
- data/kinde_api/lib/kinde_api/api/apis_api.rb +640 -127
- data/kinde_api/lib/kinde_api/api/applications_api.rb +524 -112
- data/kinde_api/lib/kinde_api/api/billing_agreements_api.rb +166 -0
- data/kinde_api/lib/kinde_api/api/billing_entitlements_api.rb +105 -0
- data/kinde_api/lib/kinde_api/api/billing_meter_usage_api.rb +90 -0
- data/kinde_api/lib/kinde_api/api/business_api.rb +61 -126
- data/kinde_api/lib/kinde_api/api/callbacks_api.rb +152 -172
- data/kinde_api/lib/kinde_api/api/connected_apps_api.rb +57 -67
- data/kinde_api/lib/kinde_api/api/connections_api.rb +433 -0
- data/kinde_api/lib/kinde_api/api/environment_variables_api.rb +347 -0
- data/kinde_api/lib/kinde_api/api/environments_api.rb +327 -78
- data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +68 -88
- data/kinde_api/lib/kinde_api/api/identities_api.rb +222 -0
- data/kinde_api/lib/kinde_api/api/industries_api.rb +29 -34
- data/kinde_api/lib/kinde_api/api/mfa_api.rb +90 -0
- data/kinde_api/lib/kinde_api/api/o_auth_api.rb +104 -129
- data/kinde_api/lib/kinde_api/api/organizations_api.rb +1689 -544
- data/kinde_api/lib/kinde_api/api/permissions_api.rb +76 -80
- data/kinde_api/lib/kinde_api/api/properties_api.rb +300 -0
- data/kinde_api/lib/kinde_api/api/property_categories_api.rb +237 -0
- data/kinde_api/lib/kinde_api/api/roles_api.rb +432 -166
- data/kinde_api/lib/kinde_api/api/search_api.rb +97 -0
- data/kinde_api/lib/kinde_api/api/subscribers_api.rb +59 -60
- data/kinde_api/lib/kinde_api/api/timezones_api.rb +29 -34
- data/kinde_api/lib/kinde_api/api/users_api.rb +900 -150
- data/kinde_api/lib/kinde_api/api/webhooks_api.rb +404 -0
- data/kinde_api/lib/kinde_api/api_client.rb +79 -68
- data/kinde_api/lib/kinde_api/api_error.rb +16 -16
- data/kinde_api/lib/kinde_api/configuration.rb +101 -24
- data/kinde_api/lib/kinde_api/models/add_api_scope_request.rb +235 -0
- data/kinde_api/lib/kinde_api/models/add_apis_request.rb +54 -49
- data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/add_organization_users_request_users_inner.rb +53 -51
- data/kinde_api/lib/kinde_api/models/add_organization_users_response.rb +52 -50
- data/kinde_api/lib/kinde_api/models/add_role_scope_request.rb +225 -0
- data/kinde_api/lib/kinde_api/models/add_role_scope_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/api_result.rb +38 -40
- data/kinde_api/lib/kinde_api/models/applications.rb +55 -50
- data/kinde_api/lib/kinde_api/models/authorize_app_api_response.rb +250 -0
- data/kinde_api/lib/kinde_api/models/category.rb +228 -0
- data/kinde_api/lib/kinde_api/models/connected_apps_access_token.rb +44 -45
- data/kinde_api/lib/kinde_api/models/connected_apps_auth_url.rb +44 -45
- data/kinde_api/lib/kinde_api/models/connection.rb +239 -0
- data/kinde_api/lib/kinde_api/models/connection_connection.rb +246 -0
- data/kinde_api/lib/kinde_api/models/create_api_scopes_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_api_scopes_response_scope.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_apis_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_apis_response_api.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_application_request.rb +60 -52
- data/kinde_api/lib/kinde_api/models/create_application_response.rb +50 -49
- data/kinde_api/lib/kinde_api/models/create_application_response_application.rb +51 -50
- data/kinde_api/lib/kinde_api/models/create_billing_agreement_request.rb +260 -0
- data/kinde_api/lib/kinde_api/models/create_category_request.rb +274 -0
- data/kinde_api/lib/kinde_api/models/create_category_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/create_category_response_category.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request.rb +306 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request_options.rb +106 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request_options_one_of.rb +241 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request_options_one_of1.rb +303 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request_options_one_of2.rb +333 -0
- data/kinde_api/lib/kinde_api/models/create_connection_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/create_connection_response_connection.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_environment_variable_request.rb +250 -0
- data/kinde_api/lib/kinde_api/models/create_environment_variable_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_environment_variable_response_environment_variable.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_feature_flag_request.rb +87 -77
- data/kinde_api/lib/kinde_api/models/create_identity_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/create_identity_response_identity.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_meter_usage_record_request.rb +309 -0
- data/kinde_api/lib/kinde_api/models/create_meter_usage_record_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/create_organization_request.rb +175 -100
- data/kinde_api/lib/kinde_api/models/create_organization_response.rb +57 -50
- data/kinde_api/lib/kinde_api/models/create_organization_response_organization.rb +49 -42
- data/kinde_api/lib/kinde_api/models/create_organization_user_permission_request.rb +38 -41
- data/kinde_api/lib/kinde_api/models/create_organization_user_role_request.rb +38 -41
- data/kinde_api/lib/kinde_api/models/create_permission_request.rb +50 -49
- data/kinde_api/lib/kinde_api/models/create_property_request.rb +356 -0
- data/kinde_api/lib/kinde_api/models/create_property_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/create_property_response_property.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_role_request.rb +56 -53
- data/kinde_api/lib/kinde_api/models/create_roles_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_roles_response_role.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response.rb +38 -41
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response_subscriber.rb +38 -41
- data/kinde_api/lib/kinde_api/models/create_user_identity_request.rb +284 -0
- data/kinde_api/lib/kinde_api/models/create_user_request.rb +62 -50
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +60 -52
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner_details.rb +67 -40
- data/kinde_api/lib/kinde_api/models/create_user_request_profile.rb +54 -45
- data/kinde_api/lib/kinde_api/models/create_user_response.rb +53 -51
- data/kinde_api/lib/kinde_api/models/create_web_hook_request.rb +268 -0
- data/kinde_api/lib/kinde_api/models/create_webhook_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_webhook_response_webhook.rb +228 -0
- data/kinde_api/lib/kinde_api/models/delete_api_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/delete_environment_variable_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/delete_role_scope_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/delete_webhook_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/environment_variable.rb +261 -0
- data/kinde_api/lib/kinde_api/models/error.rb +44 -44
- data/kinde_api/lib/kinde_api/models/error_response.rb +40 -42
- data/kinde_api/lib/kinde_api/models/event_type.rb +255 -0
- data/kinde_api/lib/kinde_api/models/get_api_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_api_response_api.rb +272 -0
- data/kinde_api/lib/kinde_api/models/get_api_response_api_applications_inner.rb +285 -0
- data/kinde_api/lib/kinde_api/models/get_api_response_api_scopes_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_api_scope_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_api_scopes_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/get_api_scopes_response_scopes_inner.rb +240 -0
- data/kinde_api/lib/kinde_api/models/get_apis_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_apis_response_apis_inner.rb +261 -0
- data/kinde_api/lib/kinde_api/models/get_apis_response_apis_inner_scopes_inner.rb +228 -0
- data/kinde_api/lib/kinde_api/models/get_application_response.rb +50 -49
- data/kinde_api/lib/kinde_api/models/get_application_response_application.rb +126 -57
- data/kinde_api/lib/kinde_api/models/get_applications_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_billing_agreements_response.rb +252 -0
- data/kinde_api/lib/kinde_api/models/get_billing_agreements_response_agreements_inner.rb +262 -0
- data/kinde_api/lib/kinde_api/models/get_billing_agreements_response_agreements_inner_entitlements_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_billing_entitlements_response.rb +264 -0
- data/kinde_api/lib/kinde_api/models/get_billing_entitlements_response_entitlements_inner.rb +290 -0
- data/kinde_api/lib/kinde_api/models/get_billing_entitlements_response_plans_inner.rb +229 -0
- data/kinde_api/lib/kinde_api/models/get_business_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_business_response_business.rb +326 -0
- data/kinde_api/lib/kinde_api/models/get_categories_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_connections_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_environment_feature_flags_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_environment_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_environment_response_environment.rb +526 -0
- data/kinde_api/lib/kinde_api/models/get_environment_response_environment_background_color.rb +237 -0
- data/kinde_api/lib/kinde_api/models/get_environment_response_environment_link_color.rb +237 -0
- data/kinde_api/lib/kinde_api/models/get_environment_variable_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_environment_variables_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_event_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_event_response_event.rb +257 -0
- data/kinde_api/lib/kinde_api/models/get_event_types_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/get_identities_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_industries_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/get_industries_response_industries_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response.rb +52 -50
- data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response_feature_flags_value.rb +52 -52
- data/kinde_api/lib/kinde_api/models/get_organization_response.rb +547 -0
- data/kinde_api/lib/kinde_api/models/get_organization_response_billing.rb +232 -0
- data/kinde_api/lib/kinde_api/models/get_organization_response_billing_agreements_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_organization_users_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_organizations_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_organizations_user_permissions_response.rb +52 -50
- data/kinde_api/lib/kinde_api/models/get_organizations_user_roles_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_permissions_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_properties_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_property_values_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_redirect_callback_urls_response.rb +40 -42
- data/kinde_api/lib/kinde_api/models/get_role_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_role_response_role.rb +260 -0
- data/kinde_api/lib/kinde_api/models/get_roles_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_subscriber_response.rb +52 -50
- data/kinde_api/lib/kinde_api/models/get_subscribers_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_timezones_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/get_timezones_response_timezones_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_user_mfa_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/get_user_mfa_response_mfa.rb +280 -0
- data/kinde_api/lib/kinde_api/models/get_user_sessions_response.rb +248 -0
- data/kinde_api/lib/kinde_api/models/get_user_sessions_response_sessions_inner.rb +331 -0
- data/kinde_api/lib/kinde_api/models/get_webhooks_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/identity.rb +300 -0
- data/kinde_api/lib/kinde_api/models/logout_redirect_urls.rb +60 -42
- data/kinde_api/lib/kinde_api/models/not_found_response.rb +219 -0
- data/kinde_api/lib/kinde_api/models/not_found_response_errors.rb +228 -0
- data/kinde_api/lib/kinde_api/models/organization_item_schema.rb +272 -0
- data/kinde_api/lib/kinde_api/models/organization_user.rb +122 -62
- data/kinde_api/lib/kinde_api/models/organization_user_permission.rb +73 -59
- data/kinde_api/lib/kinde_api/models/organization_user_permission_roles_inner.rb +47 -46
- data/kinde_api/lib/kinde_api/models/organization_user_role.rb +55 -50
- data/kinde_api/lib/kinde_api/models/organization_user_role_permissions.rb +55 -50
- data/kinde_api/lib/kinde_api/models/organization_user_role_permissions_permissions.rb +38 -41
- data/kinde_api/lib/kinde_api/models/permissions.rb +57 -54
- data/kinde_api/lib/kinde_api/models/property.rb +264 -0
- data/kinde_api/lib/kinde_api/models/property_value.rb +257 -0
- data/kinde_api/lib/kinde_api/models/read_env_logo_response.rb +242 -0
- data/kinde_api/lib/kinde_api/models/read_env_logo_response_logos_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/read_logo_response.rb +242 -0
- data/kinde_api/lib/kinde_api/models/read_logo_response_logos_inner.rb +240 -0
- data/kinde_api/lib/kinde_api/models/redirect_callback_urls.rb +40 -42
- data/kinde_api/lib/kinde_api/models/replace_connection_request.rb +251 -0
- data/kinde_api/lib/kinde_api/models/replace_connection_request_options.rb +106 -0
- data/kinde_api/lib/kinde_api/models/replace_connection_request_options_one_of.rb +293 -0
- data/kinde_api/lib/kinde_api/models/replace_connection_request_options_one_of1.rb +313 -0
- data/kinde_api/lib/kinde_api/models/replace_logout_redirect_urls_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/replace_mfa_request.rb +276 -0
- data/kinde_api/lib/kinde_api/models/replace_organization_mfa_request.rb +249 -0
- data/kinde_api/lib/kinde_api/models/replace_redirect_callback_urls_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/role.rb +63 -53
- data/kinde_api/lib/kinde_api/models/role_permissions_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/role_scopes_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/roles.rb +68 -53
- data/kinde_api/lib/kinde_api/models/scopes.rb +250 -0
- data/kinde_api/lib/kinde_api/models/search_users_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/search_users_response_results_inner.rb +374 -0
- data/kinde_api/lib/kinde_api/models/set_user_password_request.rb +311 -0
- data/kinde_api/lib/kinde_api/models/subscriber.rb +63 -54
- data/kinde_api/lib/kinde_api/models/subscribers_subscriber.rb +71 -58
- data/kinde_api/lib/kinde_api/models/success_response.rb +47 -46
- data/kinde_api/lib/kinde_api/models/token_error_response.rb +44 -45
- data/kinde_api/lib/kinde_api/models/token_introspect.rb +63 -58
- data/kinde_api/lib/kinde_api/models/update_api_applications_request.rb +42 -44
- data/kinde_api/lib/kinde_api/models/update_api_applications_request_applications_inner.rb +48 -49
- data/kinde_api/lib/kinde_api/models/update_api_scope_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/update_application_request.rb +78 -54
- data/kinde_api/lib/kinde_api/models/update_application_tokens_request.rb +260 -0
- data/kinde_api/lib/kinde_api/models/update_applications_property_request.rb +224 -0
- data/kinde_api/lib/kinde_api/models/update_applications_property_request_value.rb +106 -0
- data/kinde_api/lib/kinde_api/models/update_business_request.rb +320 -0
- data/kinde_api/lib/kinde_api/models/update_category_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/update_connection_request.rb +251 -0
- data/kinde_api/lib/kinde_api/models/update_environement_feature_flag_override_request.rb +40 -43
- data/kinde_api/lib/kinde_api/models/update_environment_variable_request.rb +240 -0
- data/kinde_api/lib/kinde_api/models/update_environment_variable_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/update_identity_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/update_organization_properties_request.rb +225 -0
- data/kinde_api/lib/kinde_api/models/update_organization_request.rb +209 -91
- data/kinde_api/lib/kinde_api/models/update_organization_sessions_request.rb +284 -0
- data/kinde_api/lib/kinde_api/models/update_organization_users_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/update_organization_users_request_users_inner.rb +59 -55
- data/kinde_api/lib/kinde_api/models/update_organization_users_response.rb +76 -57
- data/kinde_api/lib/kinde_api/models/update_property_request.rb +265 -0
- data/kinde_api/lib/kinde_api/models/update_role_permissions_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/update_role_permissions_request_permissions_inner.rb +44 -45
- data/kinde_api/lib/kinde_api/models/update_role_permissions_response.rb +66 -56
- data/kinde_api/lib/kinde_api/models/update_roles_request.rb +61 -56
- data/kinde_api/lib/kinde_api/models/update_user_request.rb +75 -52
- data/kinde_api/lib/kinde_api/models/update_user_response.rb +75 -67
- data/kinde_api/lib/kinde_api/models/update_web_hook_request.rb +243 -0
- data/kinde_api/lib/kinde_api/models/update_webhook_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/update_webhook_response_webhook.rb +219 -0
- data/kinde_api/lib/kinde_api/models/user.rb +138 -97
- data/kinde_api/lib/kinde_api/models/user_identities_inner.rb +47 -46
- data/kinde_api/lib/kinde_api/models/user_identity.rb +44 -45
- data/kinde_api/lib/kinde_api/models/user_identity_result.rb +38 -41
- data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +113 -79
- data/kinde_api/lib/kinde_api/models/users_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/users_response_users_inner.rb +138 -98
- data/kinde_api/lib/kinde_api/models/webhook.rb +267 -0
- data/kinde_api/lib/kinde_api/version.rb +12 -12
- data/kinde_api/lib/kinde_api.rb +160 -36
- data/kinde_api/spec/api/billing_agreements_api_spec.rb +62 -0
- data/kinde_api/spec/api/billing_entitlements_api_spec.rb +52 -0
- data/kinde_api/spec/api/billing_meter_usage_api_spec.rb +47 -0
- data/kinde_api/spec/api/connections_api_spec.rb +112 -0
- data/kinde_api/spec/api/environment_variables_api_spec.rb +95 -0
- data/kinde_api/spec/api/identities_api_spec.rb +72 -0
- data/kinde_api/spec/api/mfa_api_spec.rb +47 -0
- data/kinde_api/spec/api/properties_api_spec.rb +87 -0
- data/kinde_api/spec/api/property_categories_api_spec.rb +75 -0
- data/kinde_api/spec/api/search_api_spec.rb +52 -0
- data/kinde_api/spec/api/webhooks_api_spec.rb +106 -0
- data/kinde_api/spec/api_client_spec.rb +27 -21
- data/kinde_api/spec/configuration_spec.rb +14 -14
- data/kinde_api/spec/models/add_api_scope_request_spec.rb +40 -0
- data/kinde_api/spec/models/add_role_scope_request_spec.rb +34 -0
- data/kinde_api/spec/models/add_role_scope_response_spec.rb +40 -0
- data/kinde_api/spec/models/authorize_app_api_response_spec.rb +52 -0
- data/kinde_api/spec/models/category_spec.rb +40 -0
- data/kinde_api/spec/models/connection_connection_spec.rb +52 -0
- data/kinde_api/spec/models/connection_spec.rb +46 -0
- data/kinde_api/spec/models/create_api_scopes_response_scope_spec.rb +34 -0
- data/kinde_api/spec/models/create_api_scopes_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_apis_response_api_spec.rb +34 -0
- data/kinde_api/spec/models/create_apis_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_billing_agreement_request_spec.rb +52 -0
- data/kinde_api/spec/models/create_category_request_spec.rb +44 -0
- data/kinde_api/spec/models/create_category_response_category_spec.rb +34 -0
- data/kinde_api/spec/models/create_category_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_connection_request_options_one_of1_spec.rb +82 -0
- data/kinde_api/spec/models/create_connection_request_options_one_of2_spec.rb +100 -0
- data/kinde_api/spec/models/create_connection_request_options_one_of_spec.rb +46 -0
- data/kinde_api/spec/models/create_connection_request_options_spec.rb +31 -0
- data/kinde_api/spec/models/create_connection_request_spec.rb +68 -0
- data/kinde_api/spec/models/create_connection_response_connection_spec.rb +34 -0
- data/kinde_api/spec/models/create_connection_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_environment_variable_request_spec.rb +46 -0
- data/kinde_api/spec/models/create_environment_variable_response_environment_variable_spec.rb +34 -0
- data/kinde_api/spec/models/create_environment_variable_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_identity_response_identity_spec.rb +34 -0
- data/kinde_api/spec/models/create_identity_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_meter_usage_record_request_spec.rb +62 -0
- data/kinde_api/spec/models/create_meter_usage_record_response_spec.rb +40 -0
- data/kinde_api/spec/models/create_property_request_spec.rb +78 -0
- data/kinde_api/spec/models/create_property_response_property_spec.rb +34 -0
- data/kinde_api/spec/models/create_property_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_roles_response_role_spec.rb +34 -0
- data/kinde_api/spec/models/create_roles_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_user_identity_request_spec.rb +56 -0
- data/kinde_api/spec/models/create_web_hook_request_spec.rb +52 -0
- data/kinde_api/spec/models/create_webhook_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_webhook_response_webhook_spec.rb +40 -0
- data/kinde_api/spec/models/delete_api_response_spec.rb +40 -0
- data/kinde_api/spec/models/delete_environment_variable_response_spec.rb +40 -0
- data/kinde_api/spec/models/delete_role_scope_response_spec.rb +40 -0
- data/kinde_api/spec/models/delete_webhook_response_spec.rb +40 -0
- data/kinde_api/spec/models/environment_variable_spec.rb +58 -0
- data/kinde_api/spec/models/event_type_spec.rb +58 -0
- data/kinde_api/spec/models/get_api_response_api_applications_inner_spec.rb +56 -0
- data/kinde_api/spec/models/get_api_response_api_scopes_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_api_response_api_spec.rb +64 -0
- data/kinde_api/spec/models/get_api_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_api_scope_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_api_scopes_response_scopes_inner_spec.rb +46 -0
- data/kinde_api/spec/models/get_api_scopes_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_apis_response_apis_inner_scopes_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_apis_response_apis_inner_spec.rb +58 -0
- data/kinde_api/spec/models/get_apis_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_billing_agreements_response_agreements_inner_entitlements_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_billing_agreements_response_agreements_inner_spec.rb +58 -0
- data/kinde_api/spec/models/get_billing_agreements_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_billing_entitlements_response_entitlements_inner_spec.rb +76 -0
- data/kinde_api/spec/models/get_billing_entitlements_response_plans_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_billing_entitlements_response_spec.rb +58 -0
- data/kinde_api/spec/models/get_business_response_business_spec.rb +94 -0
- data/kinde_api/spec/models/get_business_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_categories_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_connections_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_environment_response_environment_background_color_spec.rb +46 -0
- data/kinde_api/spec/models/get_environment_response_environment_link_color_spec.rb +46 -0
- data/kinde_api/spec/models/get_environment_response_environment_spec.rb +192 -0
- data/kinde_api/spec/models/get_environment_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_environment_variable_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_environment_variables_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_event_response_event_spec.rb +58 -0
- data/kinde_api/spec/models/get_event_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_event_types_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_identities_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_industries_response_industries_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_industries_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_organization_response_billing_agreements_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_organization_response_billing_spec.rb +40 -0
- data/kinde_api/spec/models/get_organization_response_spec.rb +204 -0
- data/kinde_api/spec/models/get_properties_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_property_values_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_role_response_role_spec.rb +58 -0
- data/kinde_api/spec/models/get_role_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_timezones_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_timezones_response_timezones_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_user_mfa_response_mfa_spec.rb +70 -0
- data/kinde_api/spec/models/get_user_mfa_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_user_sessions_response_sessions_inner_spec.rb +100 -0
- data/kinde_api/spec/models/get_user_sessions_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_webhooks_response_spec.rb +46 -0
- data/kinde_api/spec/models/identity_spec.rb +82 -0
- data/kinde_api/spec/models/not_found_response_errors_spec.rb +40 -0
- data/kinde_api/spec/models/not_found_response_spec.rb +34 -0
- data/kinde_api/spec/models/organization_item_schema_spec.rb +64 -0
- data/kinde_api/spec/models/property_spec.rb +64 -0
- data/kinde_api/spec/models/property_value_spec.rb +58 -0
- data/kinde_api/spec/models/read_env_logo_response_logos_inner_spec.rb +40 -0
- data/kinde_api/spec/models/read_env_logo_response_spec.rb +46 -0
- data/kinde_api/spec/models/read_logo_response_logos_inner_spec.rb +46 -0
- data/kinde_api/spec/models/read_logo_response_spec.rb +46 -0
- data/kinde_api/spec/models/replace_connection_request_options_one_of1_spec.rb +88 -0
- data/kinde_api/spec/models/replace_connection_request_options_one_of_spec.rb +76 -0
- data/kinde_api/spec/models/replace_connection_request_options_spec.rb +31 -0
- data/kinde_api/spec/models/replace_connection_request_spec.rb +52 -0
- data/kinde_api/spec/models/replace_mfa_request_spec.rb +48 -0
- data/kinde_api/spec/models/replace_organization_mfa_request_spec.rb +38 -0
- data/kinde_api/spec/models/role_permissions_response_spec.rb +52 -0
- data/kinde_api/spec/models/role_scopes_response_spec.rb +46 -0
- data/kinde_api/spec/models/scopes_spec.rb +52 -0
- data/kinde_api/spec/models/search_users_response_results_inner_spec.rb +118 -0
- data/kinde_api/spec/models/search_users_response_spec.rb +46 -0
- data/kinde_api/spec/models/set_user_password_request_spec.rb +66 -0
- data/kinde_api/spec/models/update_api_scope_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_application_tokens_request_spec.rb +58 -0
- data/kinde_api/spec/models/update_applications_property_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_applications_property_request_value_spec.rb +31 -0
- data/kinde_api/spec/models/update_business_request_spec.rb +88 -0
- data/kinde_api/spec/models/update_category_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_connection_request_spec.rb +52 -0
- data/kinde_api/spec/models/update_environment_variable_request_spec.rb +46 -0
- data/kinde_api/spec/models/update_environment_variable_response_spec.rb +40 -0
- data/kinde_api/spec/models/update_identity_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_organization_properties_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_organization_sessions_request_spec.rb +56 -0
- data/kinde_api/spec/models/update_property_request_spec.rb +52 -0
- data/kinde_api/spec/models/update_web_hook_request_spec.rb +46 -0
- data/kinde_api/spec/models/update_webhook_response_spec.rb +46 -0
- data/kinde_api/spec/models/update_webhook_response_webhook_spec.rb +34 -0
- data/kinde_api/spec/models/webhook_spec.rb +64 -0
- data/kinde_api/spec/spec_helper.rb +63 -62
- data/lib/kinde_sdk/client.rb +88 -19
- data/lib/kinde_sdk/current.rb +16 -0
- data/lib/kinde_sdk/engine.rb +6 -0
- data/lib/kinde_sdk/middleware.rb +16 -0
- data/lib/kinde_sdk/token_manager.rb +85 -0
- data/lib/kinde_sdk/token_store.rb +29 -0
- data/lib/kinde_sdk/version.rb +1 -1
- data/lib/kinde_sdk.rb +22 -14
- data/spec/examples.txt +24 -0
- data/spec/kinde_sdk_spec.rb +211 -125
- data/spec/spec_helper.rb +4 -4
- metadata +656 -88
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e09a644031cc5915d99166b84fc7d9cd59657fbe2991faa4a93697c51f39978a
|
4
|
+
data.tar.gz: 30a74f7a9cc11d9c7eebf827eb4db4db9c904ce47ca3d5db6cefaecd6d438d3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caa067305857d9904758f66c5cb522b9e4f104258686431fe846f968623c93eb6dda2c1c2fd8ccb0281d052e7e528d6f48d64aa5ea4fadb11c26b6abbb1c259a
|
7
|
+
data.tar.gz: 7f459347afb2493a4a722f8a6d249906d95994008d9f89e6475e6a673929f09cf15414c4fb41644d478898f1ca6aef408805741921aa9ae4dc298c20f45f45e8
|
@@ -6,18 +6,25 @@ require 'json'
|
|
6
6
|
require 'jwt'
|
7
7
|
|
8
8
|
module KindeSdk
|
9
|
+
# AuthController handles all authentication-related actions for the Kinde SDK
|
10
|
+
# including OAuth2 flows, token management, and session handling
|
9
11
|
class AuthController < ActionController::Base
|
10
|
-
|
12
|
+
include AuthHelper
|
13
|
+
|
11
14
|
before_action :validate_state, only: :callback
|
15
|
+
before_action :clear_auth_session, only: [:logout_callback, :logout]
|
12
16
|
|
17
|
+
# Initiates the OAuth2 authorization flow
|
18
|
+
# Generates a secure nonce and redirects to Kinde's authorization endpoint
|
19
|
+
# @return [void] Redirects to Kinde's authorization URL
|
13
20
|
def auth
|
14
|
-
# Generate a secure random nonce
|
21
|
+
# Generate a secure random nonce for CSRF protection
|
15
22
|
nonce = SecureRandom.urlsafe_base64(16)
|
16
23
|
|
17
|
-
#
|
24
|
+
# Get authorization URL and PKCE code verifier from SDK
|
18
25
|
auth_data = KindeSdk.auth_url(nonce: nonce)
|
19
26
|
|
20
|
-
# Store in session
|
27
|
+
# Store PKCE code verifier and nonce in session for validation
|
21
28
|
session[:code_verifier] = auth_data[:code_verifier] if auth_data[:code_verifier].present?
|
22
29
|
session[:auth_nonce] = nonce
|
23
30
|
session[:auth_state] = {
|
@@ -26,41 +33,31 @@ module KindeSdk
|
|
26
33
|
}
|
27
34
|
|
28
35
|
redirect_to auth_data[:url], allow_other_host: true
|
36
|
+
rescue StandardError => e
|
37
|
+
handle_error("Auth initialization failed", e)
|
29
38
|
end
|
30
39
|
|
40
|
+
# Handles the OAuth2 callback from Kinde
|
41
|
+
# Validates the response, exchanges code for tokens, and sets up the session
|
42
|
+
# @return [void] Redirects to root path on success
|
31
43
|
def callback
|
32
|
-
tokens =
|
33
|
-
|
34
|
-
code_verifier: KindeSdk.config.pkce_enabled ? session[:code_verifier] : nil
|
35
|
-
).slice(:access_token, :id_token, :refresh_token, :expires_at)
|
36
|
-
|
37
|
-
|
38
|
-
# Validate nonce in ID token
|
39
|
-
id_token = tokens[:id_token]
|
40
|
-
issuer = KindeSdk.config.domain
|
41
|
-
client_id = KindeSdk.config.client_id
|
42
|
-
original_nonce = session[:auth_nonce]
|
43
|
-
unless validate_nonce(id_token, original_nonce, issuer, client_id)
|
44
|
-
Rails.logger.warn("Nonce validation failed")
|
45
|
-
redirect_to "/", alert: "Invalid authentication nonce"
|
46
|
-
return
|
47
|
-
end
|
44
|
+
tokens = fetch_and_validate_tokens
|
45
|
+
return if performed?
|
48
46
|
|
49
|
-
# Store tokens and user in session
|
50
|
-
|
51
|
-
|
52
|
-
session
|
47
|
+
# Store tokens and user information in session
|
48
|
+
set_session_tokens(tokens)
|
49
|
+
|
50
|
+
# Clean up temporary auth session data
|
51
|
+
clear_auth_session
|
53
52
|
|
54
|
-
# Clear nonce and state after successful authentication
|
55
|
-
session.delete(:auth_nonce)
|
56
|
-
session.delete(:auth_state)
|
57
|
-
session.delete(:code_verifier)
|
58
53
|
redirect_to "/"
|
59
54
|
rescue StandardError => e
|
60
|
-
|
61
|
-
redirect_to "/", alert: "Authentication failed"
|
55
|
+
handle_error("Authentication callback failed", e)
|
62
56
|
end
|
63
57
|
|
58
|
+
# Handles machine-to-machine (M2M) authentication using client credentials
|
59
|
+
# Stores the access token in Redis for subsequent API calls
|
60
|
+
# @return [void] Redirects to management path on success
|
64
61
|
def client_credentials_auth
|
65
62
|
result = KindeSdk.client_credentials_access(
|
66
63
|
client_id: ENV["KINDE_MANAGEMENT_CLIENT_ID"],
|
@@ -68,30 +65,113 @@ module KindeSdk
|
|
68
65
|
)
|
69
66
|
|
70
67
|
if result["error"].present?
|
71
|
-
Rails.logger.error("Client credentials auth failed: #{result['error']}")
|
72
68
|
raise result["error"]
|
73
69
|
end
|
74
70
|
|
71
|
+
# Store M2M token in Redis with expiration
|
75
72
|
$redis.set("kinde_m2m_token", result["access_token"], ex: result["expires_in"].to_i)
|
76
73
|
redirect_to mgmt_path
|
74
|
+
rescue StandardError => e
|
75
|
+
handle_error("Client credentials authentication failed", e)
|
76
|
+
end
|
77
|
+
|
78
|
+
# Refreshes the access token using the refresh token
|
79
|
+
# @return [void] Redirects to root path on success
|
80
|
+
def refresh_token
|
81
|
+
return redirect_with_error("No valid session found") unless session[:kinde_token_store].present?
|
82
|
+
|
83
|
+
if refresh_session_tokens
|
84
|
+
redirect_to "/"
|
85
|
+
else
|
86
|
+
redirect_with_error("Failed to refresh token")
|
87
|
+
end
|
88
|
+
rescue StandardError => e
|
89
|
+
handle_error("Token refresh failed", e)
|
77
90
|
end
|
78
91
|
|
92
|
+
# Initiates the logout process by redirecting to Kinde's logout endpoint
|
93
|
+
# @return [void] Redirects to Kinde's logout URL
|
79
94
|
def logout
|
80
|
-
|
95
|
+
# Ensure we have a valid logout URL configured
|
96
|
+
unless KindeSdk.config.logout_url.present?
|
97
|
+
redirect_with_error("Logout URL not configured")
|
98
|
+
return
|
99
|
+
end
|
100
|
+
|
101
|
+
# Get the logout URL with our callback URL
|
102
|
+
logout_url = KindeSdk.logout_url(
|
103
|
+
logout_url: KindeSdk.config.logout_url,
|
104
|
+
domain: KindeSdk.config.domain
|
105
|
+
)
|
106
|
+
|
107
|
+
# Clear local session before redirecting to Kinde
|
108
|
+
session.delete(:kinde_token_store)
|
109
|
+
session.delete(:kinde_user)
|
110
|
+
clear_auth_session
|
111
|
+
|
112
|
+
# Redirect to Kinde's logout endpoint
|
113
|
+
redirect_to logout_url, allow_other_host: true
|
114
|
+
rescue StandardError => e
|
115
|
+
handle_error("Logout initialization failed", e)
|
81
116
|
end
|
82
117
|
|
118
|
+
# Handles the callback after successful logout
|
119
|
+
# @return [void] Redirects to root path
|
83
120
|
def logout_callback
|
84
|
-
|
121
|
+
# Session is already cleared in logout method
|
122
|
+
# Just redirect to home page
|
85
123
|
redirect_to "/"
|
86
124
|
end
|
87
125
|
|
88
126
|
private
|
127
|
+
|
128
|
+
# Fetches and validates tokens from the authorization code
|
129
|
+
# @return [Hash] The validated tokens or nil if validation fails
|
130
|
+
def fetch_and_validate_tokens
|
131
|
+
tokens = KindeSdk.fetch_tokens(
|
132
|
+
params[:code],
|
133
|
+
code_verifier: KindeSdk.config.pkce_enabled ? session[:code_verifier] : nil,
|
134
|
+
redirect_uri: KindeSdk.config.callback_url
|
135
|
+
)
|
136
|
+
|
137
|
+
if tokens[:error].present?
|
138
|
+
redirect_with_error("Token exchange failed: #{tokens[:error]}")
|
139
|
+
return nil
|
140
|
+
end
|
141
|
+
|
142
|
+
# Validate tokens using SDK's built-in validation
|
143
|
+
begin
|
144
|
+
KindeSdk.validate_jwt_token(tokens)
|
145
|
+
|
146
|
+
# Validate nonce in ID token to prevent replay attacks
|
147
|
+
decoded_token = JWT.decode(tokens[:id_token], nil, false)[0]
|
148
|
+
unless decoded_token['nonce'] == session[:auth_nonce]
|
149
|
+
redirect_with_error("Invalid authentication nonce")
|
150
|
+
return nil
|
151
|
+
end
|
152
|
+
|
153
|
+
tokens
|
154
|
+
rescue JWT::DecodeError => e
|
155
|
+
redirect_with_error("Token validation failed: #{e.message}")
|
156
|
+
nil
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# Clears temporary authentication data from the session
|
161
|
+
# @return [void]
|
162
|
+
def clear_auth_session
|
163
|
+
session.delete(:auth_nonce)
|
164
|
+
session.delete(:auth_state)
|
165
|
+
session.delete(:code_verifier)
|
166
|
+
end
|
89
167
|
|
168
|
+
# Validates the state parameter to prevent CSRF attacks
|
169
|
+
# Checks state existence, matches returned state with stored state, and validates expiration
|
170
|
+
# @return [void]
|
90
171
|
def validate_state
|
91
172
|
# Check if nonce and state exist in session
|
92
|
-
unless session[:
|
93
|
-
|
94
|
-
redirect_to "/", alert: "Invalid authentication state"
|
173
|
+
unless session[:auth_state]
|
174
|
+
redirect_with_error("Invalid authentication state")
|
95
175
|
return
|
96
176
|
end
|
97
177
|
|
@@ -107,46 +187,32 @@ module KindeSdk
|
|
107
187
|
|
108
188
|
# Verify returned state matches the state extracted from the redirect_url
|
109
189
|
unless returned_state.present? && returned_state == stored_state_from_url
|
110
|
-
|
111
|
-
redirect_to "/", alert: "Invalid authentication state"
|
190
|
+
redirect_with_error("Invalid authentication state")
|
112
191
|
return
|
113
192
|
end
|
114
193
|
|
115
|
-
#
|
194
|
+
# Check state age (expires after 15 minutes)
|
116
195
|
if Time.current.to_i - stored_state["requested_at"] > 900
|
117
|
-
|
118
|
-
redirect_to "/", alert: "Authentication session expired"
|
196
|
+
redirect_with_error("Authentication session expired")
|
119
197
|
return
|
120
198
|
end
|
121
199
|
end
|
122
200
|
|
201
|
+
# Handles errors during authentication
|
202
|
+
# @param message [String] The error message
|
203
|
+
# @param error [Exception] The exception that occurred
|
204
|
+
# @return [void]
|
205
|
+
def handle_error(message, error)
|
206
|
+
Rails.logger.error("Error: #{error.message}")
|
207
|
+
redirect_with_error(message)
|
208
|
+
end
|
123
209
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
id_token,
|
131
|
-
nil,
|
132
|
-
true,
|
133
|
-
algorithm: 'RS256',
|
134
|
-
iss: issuer,
|
135
|
-
aud: client_id,
|
136
|
-
verify_iss: true,
|
137
|
-
verify_aud: true,
|
138
|
-
jwks: { keys: jwks['keys'] }
|
139
|
-
)
|
140
|
-
|
141
|
-
payload = decoded_token[0]
|
142
|
-
nonce_from_token = payload['nonce']
|
143
|
-
|
144
|
-
nonce_from_token == original_nonce
|
145
|
-
rescue StandardError => e
|
146
|
-
Rails.logger.error("Nonce validation error: #{e.message}")
|
147
|
-
false
|
210
|
+
# Redirects to root path with an error message
|
211
|
+
# @param message [String] The error message
|
212
|
+
# @return [void]
|
213
|
+
def redirect_with_error(message)
|
214
|
+
Rails.logger.error("Redirecting with error: #{message}")
|
215
|
+
redirect_to "/", alert: message
|
148
216
|
end
|
149
|
-
|
150
|
-
|
151
217
|
end
|
152
218
|
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
module AuthHelper
|
2
|
+
# Sets up session tokens and user information after successful authentication
|
3
|
+
# @param tokens [Hash] The authentication tokens received from Kinde
|
4
|
+
# @return [void]
|
5
|
+
def set_session_tokens(tokens)
|
6
|
+
# Create token store from tokens
|
7
|
+
token_store = KindeSdk::TokenManager.create_store(tokens)
|
8
|
+
|
9
|
+
# Store minimal token data in session
|
10
|
+
session[:kinde_token_store] = {
|
11
|
+
access_token: token_store.bearer_token,
|
12
|
+
refresh_token: token_store.tokens[:refresh_token],
|
13
|
+
expires_at: token_store.expires_at
|
14
|
+
}
|
15
|
+
|
16
|
+
# Get and store minimal user info
|
17
|
+
client = KindeSdk.client(tokens)
|
18
|
+
user_info = client.oauth.get_user_profile_v2.to_hash
|
19
|
+
|
20
|
+
# Validate user info before storing
|
21
|
+
raise ArgumentError, "Invalid user info received" unless user_info[:id].present?
|
22
|
+
|
23
|
+
session[:kinde_user] = {
|
24
|
+
id: user_info[:id],
|
25
|
+
email: user_info[:email],
|
26
|
+
first_name: user_info[:given_name],
|
27
|
+
last_name: user_info[:family_name]
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Checks if the user is currently logged in
|
32
|
+
# @return [Boolean] true if the user is logged in and token is valid
|
33
|
+
def logged_in?
|
34
|
+
!token_expired?
|
35
|
+
end
|
36
|
+
|
37
|
+
# Checks if the session contains token data
|
38
|
+
# @return [Boolean] true if session contains token data
|
39
|
+
def session_present_in?
|
40
|
+
session[:kinde_token_store].present?
|
41
|
+
end
|
42
|
+
|
43
|
+
# Checks if the current token has expired
|
44
|
+
# @return [Boolean] true if token is expired or invalid
|
45
|
+
def token_expired?
|
46
|
+
return true unless session[:kinde_token_store].present?
|
47
|
+
|
48
|
+
client = get_client
|
49
|
+
return true unless client
|
50
|
+
|
51
|
+
client.token_expired?
|
52
|
+
rescue JWT::DecodeError => e
|
53
|
+
Rails.logger.error("JWT decode error: #{e.message}")
|
54
|
+
true
|
55
|
+
rescue StandardError => e
|
56
|
+
Rails.logger.error("Error checking token expiration: #{e.message}")
|
57
|
+
true
|
58
|
+
end
|
59
|
+
|
60
|
+
# Attempts to refresh the session tokens
|
61
|
+
# @return [Boolean] true if refresh was successful
|
62
|
+
def refresh_session_tokens
|
63
|
+
return false unless session[:kinde_token_store].present?
|
64
|
+
|
65
|
+
# Create token store from session data
|
66
|
+
token_store = KindeSdk::TokenStore.new(session[:kinde_token_store])
|
67
|
+
|
68
|
+
# Attempt to refresh tokens
|
69
|
+
new_tokens = KindeSdk::TokenManager.refresh_tokens(token_store, session)
|
70
|
+
if new_tokens
|
71
|
+
set_session_tokens(new_tokens)
|
72
|
+
true
|
73
|
+
else
|
74
|
+
false
|
75
|
+
end
|
76
|
+
rescue StandardError => e
|
77
|
+
Rails.logger.error("Error refreshing tokens: #{e.message}")
|
78
|
+
session.delete(:kinde_token_store)
|
79
|
+
false
|
80
|
+
end
|
81
|
+
|
82
|
+
# Gets a Kinde client instance for the current session
|
83
|
+
# @return [KindeSdk::Client, nil] The client instance or nil if no valid session
|
84
|
+
def get_client
|
85
|
+
return nil unless session[:kinde_token_store].present?
|
86
|
+
KindeSdk.client(session[:kinde_token_store])
|
87
|
+
end
|
88
|
+
end
|
data/config/routes.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
KindeSdk::Engine.routes.draw do
|
2
|
-
|
2
|
+
# Authentication routes
|
3
3
|
get "auth" => "auth#auth"
|
4
|
+
get "callback" => "auth#callback"
|
4
5
|
get "logout" => "auth#logout"
|
5
6
|
get "logout_callback" => "auth#logout_callback"
|
7
|
+
get "refresh_token" => "auth#refresh_token"
|
6
8
|
get "client_credentials_auth" => "auth#client_credentials_auth"
|
7
9
|
end
|