├── .codecov.yml ├── .editorconfig ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── Bug Report.yml │ ├── Feature Request.yml │ └── config.yml ├── actions │ ├── get-prerelease │ │ └── action.yml │ ├── get-release-notes │ │ └── action.yml │ ├── get-version │ │ └── action.yml │ ├── maven-publish │ │ └── action.yml │ ├── release-create │ │ └── action.yml │ ├── rl-scanner │ │ └── action.yml │ └── tag-exists │ │ └── action.yml ├── dependabot.yml ├── pull_request_template.md ├── stale.yml └── workflows │ ├── build-and-test.yml │ ├── gradle-wrapper-validation.yml │ ├── java-release.yml │ ├── release.yml │ ├── rl-scanner.yml │ ├── semgrep.yml │ └── snyk.yml ├── .gitignore ├── .semgrepignore ├── .shiprc ├── .snyk ├── .version ├── CHANGELOG.md ├── EXAMPLES.md ├── LICENSE ├── MIGRATION_GUIDE.md ├── README.md ├── build.gradle ├── gradle.properties ├── gradle ├── maven-publish.gradle ├── versioning.gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── opslevel.yml ├── settings.gradle └── src ├── main └── java │ └── com │ └── auth0 │ ├── client │ ├── HttpOptions.java │ ├── LoggingOptions.java │ ├── ProxyOptions.java │ ├── auth │ │ ├── AuthAPI.java │ │ ├── AuthorizeUrlBuilder.java │ │ ├── ClientAssertionSigner.java │ │ ├── LogoutUrlBuilder.java │ │ ├── PasswordlessEmailType.java │ │ └── RSAClientAssertionSigner.java │ └── mgmt │ │ ├── ActionsEntity.java │ │ ├── AttackProtectionEntity.java │ │ ├── BaseManagementEntity.java │ │ ├── BlacklistsEntity.java │ │ ├── BrandingEntity.java │ │ ├── ClientGrantsEntity.java │ │ ├── ClientsEntity.java │ │ ├── ConnectionsEntity.java │ │ ├── DeviceCredentialsEntity.java │ │ ├── EmailProviderEntity.java │ │ ├── EmailTemplatesEntity.java │ │ ├── GrantsEntity.java │ │ ├── GuardianEntity.java │ │ ├── JobsEntity.java │ │ ├── KeysEntity.java │ │ ├── LogEventsEntity.java │ │ ├── LogStreamsEntity.java │ │ ├── ManagementAPI.java │ │ ├── OrganizationsEntity.java │ │ ├── PromptsEntity.java │ │ ├── RefreshTokensEntity.java │ │ ├── RequestBuilder.java │ │ ├── ResourceServerEntity.java │ │ ├── RolesEntity.java │ │ ├── RulesConfigsEntity.java │ │ ├── RulesEntity.java │ │ ├── SelfServiceProfilesEntity.java │ │ ├── SessionsEntity.java │ │ ├── SimpleTokenProvider.java │ │ ├── StatsEntity.java │ │ ├── TenantsEntity.java │ │ ├── TicketsEntity.java │ │ ├── TokenProvider.java │ │ ├── UserBlocksEntity.java │ │ ├── UsersEntity.java │ │ └── filter │ │ ├── ActionsFilter.java │ │ ├── BaseFilter.java │ │ ├── ClientFilter.java │ │ ├── ClientGrantsFilter.java │ │ ├── ConnectionFilter.java │ │ ├── DeviceCredentialsFilter.java │ │ ├── EnabledClientsFilter.java │ │ ├── EncryptionKeyFilter.java │ │ ├── FieldsFilter.java │ │ ├── GrantsFilter.java │ │ ├── InvitationsFilter.java │ │ ├── LogEventFilter.java │ │ ├── OrganizationClientGrantsFilter.java │ │ ├── PageBasedPaginationFilter.java │ │ ├── PageFilter.java │ │ ├── QueryFilter.java │ │ ├── ResourceServersFilter.java │ │ ├── RolesFilter.java │ │ ├── RulesFilter.java │ │ ├── UserFilter.java │ │ ├── UsersExportFilter.java │ │ └── UsersImportOptions.java │ ├── exception │ ├── APIException.java │ ├── Auth0Exception.java │ ├── ClientAssertionSigningException.java │ ├── IdTokenValidationException.java │ ├── PasswordStrengthErrorParser.java │ ├── PublicKeyProviderException.java │ └── RateLimitException.java │ ├── json │ ├── ObjectMapperProvider.java │ ├── auth │ │ ├── BackChannelAuthorizeResponse.java │ │ ├── BackChannelTokenResponse.java │ │ ├── CreatedOobResponse.java │ │ ├── CreatedOtpResponse.java │ │ ├── CreatedUser.java │ │ ├── MfaAuthenticator.java │ │ ├── MfaChallengeResponse.java │ │ ├── PasswordlessEmailResponse.java │ │ ├── PasswordlessSmsResponse.java │ │ ├── PushedAuthorizationResponse.java │ │ ├── TokenHolder.java │ │ ├── TokenHolderDeserializer.java │ │ └── UserInfo.java │ └── mgmt │ │ ├── Page.java │ │ ├── PageDeserializer.java │ │ ├── actions │ │ ├── Action.java │ │ ├── ActionsPage.java │ │ ├── ActionsPageDeserializer.java │ │ ├── Binding.java │ │ ├── BindingActionReference.java │ │ ├── BindingUpdate.java │ │ ├── BindingsPage.java │ │ ├── BindingsPageDeserializer.java │ │ ├── BindingsUpdateRequest.java │ │ ├── Dependency.java │ │ ├── Error.java │ │ ├── Execution.java │ │ ├── ExecutionResult.java │ │ ├── Secret.java │ │ ├── ServiceStatus.java │ │ ├── Trigger.java │ │ ├── Triggers.java │ │ ├── Version.java │ │ ├── VersionsPage.java │ │ └── VersionsPageDeserializer.java │ │ ├── attackprotection │ │ ├── BreachedPassword.java │ │ ├── BreachedPasswordStage.java │ │ ├── BreachedPasswordStageEntry.java │ │ ├── BruteForceConfiguration.java │ │ ├── Stage.java │ │ ├── StageEntry.java │ │ └── SuspiciousIPThrottlingConfiguration.java │ │ ├── blacklists │ │ └── Token.java │ │ ├── branding │ │ ├── BrandingColors.java │ │ ├── BrandingFont.java │ │ ├── BrandingSettings.java │ │ ├── UniversalLoginTemplate.java │ │ └── UniversalLoginTemplateUpdate.java │ │ ├── client │ │ ├── Addon.java │ │ ├── Addons.java │ │ ├── Android.java │ │ ├── Client.java │ │ ├── ClientAuthenticationMethods.java │ │ ├── ClientDefaultOrganization.java │ │ ├── ClientsPage.java │ │ ├── ClientsPageDeserializer.java │ │ ├── Credential.java │ │ ├── EncryptionKey.java │ │ ├── IOS.java │ │ ├── JWTConfiguration.java │ │ ├── Mobile.java │ │ ├── OIDCBackchannelLogout.java │ │ ├── PrivateKeyJwt.java │ │ ├── RefreshToken.java │ │ ├── SelfSignedTLSClientAuth.java │ │ ├── SignedRequest.java │ │ ├── SigningKey.java │ │ └── TLSClientAuth.java │ │ ├── clientgrants │ │ ├── ClientGrant.java │ │ ├── ClientGrantsPage.java │ │ └── ClientGrantsPageDeserializer.java │ │ ├── connections │ │ ├── Clients.java │ │ ├── Connection.java │ │ ├── ConnectionsPage.java │ │ ├── ConnectionsPageDeserializer.java │ │ ├── DefaultScimMappingResponse.java │ │ ├── EnabledClientRequest.java │ │ ├── EnabledClientResponse.java │ │ ├── Mapping.java │ │ ├── ScimConfigurationRequest.java │ │ ├── ScimConfigurationResponse.java │ │ ├── ScimTokenBaseResponse.java │ │ ├── ScimTokenCreateResponse.java │ │ ├── ScimTokenRequest.java │ │ └── ScimTokenResponse.java │ │ ├── devicecredentials │ │ └── DeviceCredentials.java │ │ ├── emailproviders │ │ ├── EmailProvider.java │ │ └── EmailProviderCredentials.java │ │ ├── emailtemplates │ │ └── EmailTemplate.java │ │ ├── grants │ │ ├── Grant.java │ │ ├── GrantsPage.java │ │ └── GrantsPageDeserializer.java │ │ ├── guardian │ │ ├── Enrollment.java │ │ ├── EnrollmentTicket.java │ │ ├── Factor.java │ │ ├── GuardianTemplates.java │ │ ├── SNSFactorProvider.java │ │ └── TwilioFactorProvider.java │ │ ├── jobs │ │ ├── Job.java │ │ ├── JobError.java │ │ ├── JobErrorDetails.java │ │ ├── JobSummary.java │ │ └── UsersExportField.java │ │ ├── keys │ │ ├── EncryptionKey.java │ │ ├── EncryptionKeysPage.java │ │ ├── EncryptionKeysPageDeserializer.java │ │ ├── EncryptionWrappingKeyResponse.java │ │ └── Key.java │ │ ├── logevents │ │ ├── LogEvent.java │ │ ├── LogEventsPage.java │ │ └── LogEventsPageDeserializer.java │ │ ├── logstreams │ │ ├── LogStream.java │ │ └── LogStreamFilter.java │ │ ├── organizations │ │ ├── Branding.java │ │ ├── Colors.java │ │ ├── Connection.java │ │ ├── ConnectionsPageDeserializer.java │ │ ├── CreateOrganizationClientGrantRequestBody.java │ │ ├── EnabledConnection.java │ │ ├── EnabledConnectionsPage.java │ │ ├── Invitation.java │ │ ├── InvitationsPage.java │ │ ├── InvitationsPageDeserializer.java │ │ ├── Invitee.java │ │ ├── Inviter.java │ │ ├── Member.java │ │ ├── Members.java │ │ ├── MembersPage.java │ │ ├── MembersPageDeserializer.java │ │ ├── Organization.java │ │ ├── OrganizationClientGrant.java │ │ ├── OrganizationClientGrantsPage.java │ │ ├── OrganizationClientGrantsPageDeserializer.java │ │ ├── OrganizationsPage.java │ │ ├── OrganizationsPageDeserializer.java │ │ └── Roles.java │ │ ├── permissions │ │ ├── Permission.java │ │ ├── PermissionSource.java │ │ ├── PermissionsPage.java │ │ └── PermissionsPageDeserializer.java │ │ ├── prompts │ │ └── Prompt.java │ │ ├── refreshtokens │ │ ├── Device.java │ │ ├── RefreshToken.java │ │ ├── RefreshTokensPage.java │ │ └── ResourceServer.java │ │ ├── resourceserver │ │ ├── AuthorizationDetails.java │ │ ├── EncryptionKey.java │ │ ├── ProofOfPossession.java │ │ ├── ResourceServer.java │ │ ├── ResourceServersPage.java │ │ ├── ResourceServersPageDeserializer.java │ │ ├── Scope.java │ │ └── TokenEncryption.java │ │ ├── roles │ │ ├── Role.java │ │ ├── RolesPage.java │ │ └── RolesPageDeserializer.java │ │ ├── rules │ │ ├── Rule.java │ │ ├── RulesConfig.java │ │ ├── RulesPage.java │ │ └── RulesPageDeserializer.java │ │ ├── selfserviceprofiles │ │ ├── Branding.java │ │ ├── Color.java │ │ ├── DomainAliasesConfig.java │ │ ├── EnabledOrganizations.java │ │ ├── SelfServiceProfile.java │ │ ├── SelfServiceProfileResponse.java │ │ ├── SelfServiceProfileResponsePage.java │ │ ├── SelfServiceProfileResponsePageDeserializer.java │ │ ├── SsoAccessTicketRequest.java │ │ ├── SsoAccessTicketResponse.java │ │ └── UserAttribute.java │ │ ├── sessions │ │ ├── Authentication.java │ │ ├── AuthenticationMethod.java │ │ ├── Client.java │ │ ├── Device.java │ │ ├── Session.java │ │ └── SessionsPage.java │ │ ├── stats │ │ └── DailyStats.java │ │ ├── tenants │ │ ├── Clients.java │ │ ├── DefaultTokenQuota.java │ │ ├── ErrorPageCustomization.java │ │ ├── Mtls.java │ │ ├── Organizations.java │ │ ├── PageCustomization.java │ │ ├── SessionCookie.java │ │ └── Tenant.java │ │ ├── tickets │ │ ├── EmailVerificationIdentity.java │ │ ├── EmailVerificationTicket.java │ │ └── PasswordChangeTicket.java │ │ ├── tokenquota │ │ ├── ClientCredentials.java │ │ └── TokenQuota.java │ │ ├── userblocks │ │ ├── BlockDetails.java │ │ └── UserBlocks.java │ │ └── users │ │ ├── Identity.java │ │ ├── ProfileData.java │ │ ├── RecoveryCode.java │ │ ├── User.java │ │ ├── UsersPage.java │ │ ├── UsersPageDeserializer.java │ │ └── authenticationmethods │ │ ├── AuthMethod.java │ │ ├── AuthenticationMethod.java │ │ ├── AuthenticationMethodsPage.java │ │ └── AuthenticationMethodsPageDeserializer.java │ ├── net │ ├── BaseRequest.java │ ├── EmptyBodyRequest.java │ ├── EmptyBodyVoidRequest.java │ ├── FormBodyRequest.java │ ├── MultipartRequest.java │ ├── RateLimitInterceptor.java │ ├── Request.java │ ├── Response.java │ ├── ResponseImpl.java │ ├── SignUpRequest.java │ ├── Telemetry.java │ ├── TelemetryInterceptor.java │ ├── TokenQuotaBucket.java │ ├── TokenQuotaLimit.java │ ├── TokenRequest.java │ ├── VoidRequest.java │ └── client │ │ ├── Auth0FormRequestBody.java │ │ ├── Auth0HttpClient.java │ │ ├── Auth0HttpRequest.java │ │ ├── Auth0HttpResponse.java │ │ ├── Auth0MultipartRequestBody.java │ │ ├── DefaultHttpClient.java │ │ ├── HttpMethod.java │ │ ├── HttpRequestBody.java │ │ └── package-info.java │ └── utils │ ├── Asserts.java │ ├── HttpResponseHeadersUtils.java │ └── tokens │ ├── HS256SignatureVerifier.java │ ├── IdTokenVerifier.java │ ├── PublicKeyProvider.java │ ├── RS256SignatureVerifier.java │ └── SignatureVerifier.java └── test ├── java └── com │ └── auth0 │ ├── AssertsUtil.java │ ├── client │ ├── HttpOptionsTest.java │ ├── MockServer.java │ ├── RecordedRequestMatcher.java │ ├── UrlMatcher.java │ ├── auth │ │ ├── AuthAPITest.java │ │ ├── AuthorizeUrlBuilderTest.java │ │ ├── LogoutUrlBuilderTest.java │ │ └── RSAClientAssertionSignerTest.java │ └── mgmt │ │ ├── ActionsEntityTest.java │ │ ├── AttackProtectionEntityTest.java │ │ ├── BaseMgmtEntityTest.java │ │ ├── BlacklistsEntityTest.java │ │ ├── BrandingEntityTest.java │ │ ├── ClientGrantsEntityTest.java │ │ ├── ClientsEntityTest.java │ │ ├── ConnectionsEntityTest.java │ │ ├── DeviceCredentialsEntityTest.java │ │ ├── EmailProviderEntityTest.java │ │ ├── EmailTemplatesEntityTest.java │ │ ├── GrantsEntityTest.java │ │ ├── GuardianEntityTest.java │ │ ├── JobsEntityTest.java │ │ ├── KeysEntityTest.java │ │ ├── LogEventsEntityTest.java │ │ ├── LogStreamsEntityTest.java │ │ ├── ManagementAPITest.java │ │ ├── OrganizationEntityTest.java │ │ ├── PromptsEntityTest.java │ │ ├── RefreshTokensEntityTest.java │ │ ├── ResourceServerEntityTest.java │ │ ├── RolesEntityTest.java │ │ ├── RulesConfigsEntityTest.java │ │ ├── RulesEntityTest.java │ │ ├── SelfServiceProfilesEntityTest.java │ │ ├── SessionsEntityTest.java │ │ ├── SimpleTokenProviderTest.java │ │ ├── StatsEntityTest.java │ │ ├── TenantsEntityTest.java │ │ ├── TicketsEntityTest.java │ │ ├── UserBlocksEntityTest.java │ │ ├── UsersEntityTest.java │ │ └── filter │ │ ├── ActionsFilterTest.java │ │ ├── ClientGrantsFilterTest.java │ │ ├── ConnectionFilterTest.java │ │ ├── DeviceCredentialsFilterTest.java │ │ ├── FieldFilterTest.java │ │ ├── GrantsFilterTest.java │ │ ├── LogEventFilterTest.java │ │ ├── PageBasedPaginationFilterTest.java │ │ ├── PageFilterTest.java │ │ ├── QueryFilterTest.java │ │ ├── ResourceServersFilterTest.java │ │ ├── RoleFilterTest.java │ │ ├── RulesFilterTest.java │ │ ├── UserFilterTest.java │ │ ├── UsersExportFilterTest.java │ │ └── UsersImportOptionsTest.java │ ├── exception │ └── APIExceptionTest.java │ ├── json │ ├── JsonMatcher.java │ ├── JsonTest.java │ ├── ObjectMapperProviderTest.java │ ├── auth │ │ ├── CreatedUserTest.java │ │ ├── PasswordlessEmailResponseTest.java │ │ ├── PasswordlessSmsResponseTest.java │ │ ├── TokenHolderTest.java │ │ └── UserInfoTest.java │ └── mgmt │ │ ├── ClientGrantTest.java │ │ ├── DailyStatsTest.java │ │ ├── DeviceCredentialsTest.java │ │ ├── EmailTemplateTest.java │ │ ├── GrantTest.java │ │ ├── ResourceServerTest.java │ │ ├── RoleTest.java │ │ ├── RuleTest.java │ │ ├── RulesConfigTest.java │ │ ├── ScopeTest.java │ │ ├── TokenTest.java │ │ ├── actions │ │ ├── ActionTest.java │ │ ├── ActionsPageTest.java │ │ ├── BindingsPageTest.java │ │ ├── BindingsUpdateRequestTest.java │ │ ├── ExecutionTest.java │ │ ├── TriggersTest.java │ │ ├── VersionTest.java │ │ └── VersionsPageTest.java │ │ ├── attackprotection │ │ ├── BreachedPasswordTest.java │ │ ├── BruteForceConfigurationTest.java │ │ └── SuspiciousIPThrottlingConfigurationTest.java │ │ ├── client │ │ ├── AddonTest.java │ │ ├── AddonsTest.java │ │ ├── AndroidTest.java │ │ ├── ClientTest.java │ │ ├── CredentialTest.java │ │ ├── EncryptionKeyTest.java │ │ ├── IOSTest.java │ │ ├── JWTConfigurationTest.java │ │ ├── MobileTest.java │ │ ├── RefreshTokenTest.java │ │ └── SigningKeyTest.java │ │ ├── connections │ │ ├── ConnectionTest.java │ │ ├── EnabledClientRequestTest.java │ │ ├── EnabledClientResponseTest.java │ │ ├── ScimConfigurationRequestTest.java │ │ ├── ScimConfigurationResponseTest.java │ │ ├── ScimTokenBaseResponseTest.java │ │ ├── ScimTokenCreateResponseTest.java │ │ ├── ScimTokenRequestTest.java │ │ └── ScimTokenResponseTest.java │ │ ├── emailproviders │ │ ├── EmailProviderCredentialsTest.java │ │ └── EmailProviderTest.java │ │ ├── guardian │ │ ├── EnrollmentTest.java │ │ ├── EnrollmentTicketTest.java │ │ ├── FactorTest.java │ │ ├── GuardianTemplatesTest.java │ │ ├── SNSFactorProviderTest.java │ │ └── TwilioFactorProviderTest.java │ │ ├── jobs │ │ ├── JobErrorDetailsTest.java │ │ ├── JobTest.java │ │ └── UsersExportFieldTest.java │ │ ├── keys │ │ ├── EncryptionKeyTest.java │ │ ├── EncryptionKeysPageTest.java │ │ ├── EncryptionWrappingKeyResponseTest.java │ │ └── KeyTest.java │ │ ├── logevents │ │ ├── LogEventTest.java │ │ └── LogEventsPageTest.java │ │ ├── logstreams │ │ └── LogStreamsTest.java │ │ ├── organizations │ │ ├── EnabledConnectionsPageTest.java │ │ ├── EnabledConnectionsTest.java │ │ ├── InvitationTest.java │ │ ├── InvitationsPageTest.java │ │ ├── MembersPageTest.java │ │ ├── MembersTest.java │ │ ├── OrganizationClientGrantTest.java │ │ ├── OrganizationClientGrantsPageTest.java │ │ ├── OrganizationsPageTest.java │ │ └── OrganizationsTest.java │ │ ├── permissions │ │ ├── PermissionSourceTest.java │ │ ├── PermissionTest.java │ │ └── PermissionsPageTest.java │ │ ├── refreshtokens │ │ ├── RefreshTokenTest.java │ │ └── RefreshTokensPageTest.java │ │ ├── selfserviceprofiles │ │ ├── SelfServiceProfileResponsePageTest.java │ │ ├── SelfServiceProfileResponseTest.java │ │ ├── SelfServiceProfileTest.java │ │ ├── SsoAccessTicketRequestTest.java │ │ └── SsoAccessTicketResponseTest.java │ │ ├── sessions │ │ ├── SessionTest.java │ │ └── SessionsPageTest.java │ │ ├── tenants │ │ ├── ErrorPageCustomizationTest.java │ │ ├── PageCustomizationTest.java │ │ └── TenantTest.java │ │ ├── tickets │ │ ├── EmailVerificationTicketTest.java │ │ └── PasswordChangeTicketTest.java │ │ ├── userblocks │ │ ├── BlockDetailsTest.java │ │ └── UserBlocksTest.java │ │ └── users │ │ ├── IdentityTest.java │ │ ├── ProfileDataTest.java │ │ ├── RecoveryCodeTest.java │ │ ├── UserTest.java │ │ ├── UsersPageTest.java │ │ └── authenticationmethods │ │ └── AuthenticationMethodTest.java │ ├── net │ ├── BaseRequestTest.java │ ├── EmptyBodyRequestTest.java │ ├── EmptyBodyVoidRequestTest.java │ ├── FormBodyRequestTest.java │ ├── MultipartRequestTest.java │ ├── RateLimitInterceptorTest.java │ ├── SignUpRequestTest.java │ ├── TelemetryInterceptorTest.java │ ├── TelemetryTest.java │ ├── TokenRequestTest.java │ ├── VoidRequestTest.java │ └── client │ │ ├── Auth0HttpRequestTest.java │ │ ├── Auth0HttpResponseTest.java │ │ ├── DefaultHttpClientTest.java │ │ └── multipart │ │ ├── FilePart.java │ │ ├── KeyValuePart.java │ │ └── RecordedMultipartRequest.java │ └── utils │ ├── AssertsTest.java │ ├── HttpResponseHeadersUtilsTest.java │ └── tokens │ ├── IdTokenVerifierTest.java │ └── SignatureVerifierTest.java └── resources ├── auth ├── add_oob_authenticator_response.json ├── add_otp_authenticator_response.json ├── back_channel_authorize_response.json ├── back_channel_login_status_response.json ├── error_plaintext.json ├── error_with_description.json ├── error_with_description_and_extra_properties.json ├── error_with_error.json ├── error_with_error_description.json ├── list_authenticators_response.json ├── mfa_challenge_request_response.json ├── password_strength_error_none.json ├── password_strength_error_some.json ├── passwordless_email.json ├── passwordless_sms.json ├── pushed_authorization_response.json ├── reset_password.json ├── rsa_private_key.pem ├── rsa_public_key.pem ├── sign_up.json ├── sign_up_username.json ├── tokens.json └── user_info.json ├── keys ├── bad-public-rsa.pem └── public-rsa.pem ├── mgmt ├── action.json ├── action_execution.json ├── action_trigger_bindings.json ├── action_triggers.json ├── action_version.json ├── action_versions_list.json ├── actions_list.json ├── active_users_count.json ├── authenticator_method_by_id.json ├── authenticator_method_create.json ├── authenticator_method_list.json ├── authenticator_method_paged_list.json ├── authenticator_method_update.json ├── authenticator_method_update_by_id.json ├── blacklisted_tokens_list.json ├── branding_login_template.json ├── branding_settings.json ├── breached_password_settings.json ├── brute_force_configuration.json ├── client.json ├── client_credential.json ├── client_credential_list.json ├── client_grant.json ├── client_grants_list.json ├── client_grants_paged_list.json ├── clients_list.json ├── clients_paged_list.json ├── connection.json ├── connection_scim_configuration.json ├── connection_scim_token.json ├── connection_scim_tokens.json ├── connections_list.json ├── connections_paged_list.json ├── custom_text_prompt.json ├── daily_stats_list.json ├── default_connection_scim_configuration.json ├── device_credentials.json ├── device_credentials_list.json ├── email_provider.json ├── email_template.json ├── email_verification_ticket.json ├── empty_list.json ├── enabled_clients_for_connection.json ├── encryption_key.json ├── encryption_keys_list.json ├── error_with_message.json ├── event_log.json ├── event_logs_list.json ├── event_logs_paged_list.json ├── grants_list.json ├── grants_paged_list.json ├── guardian_authentication_policies_list.json ├── guardian_enrollment.json ├── guardian_enrollment_ticket.json ├── guardian_enrollments_list.json ├── guardian_factor.json ├── guardian_factors_list.json ├── guardian_sns_factor_provider.json ├── guardian_sns_factor_provider_empty.json ├── guardian_templates.json ├── guardian_twilio_factor_provider_empty.json ├── guardian_twilio_factor_provider_with_from.json ├── guardian_twilio_factor_provider_with_messaging_service_sid.json ├── identities_list.json ├── invitation.json ├── invitations_list.json ├── invitations_paged_list.json ├── job.json ├── job_error_details.json ├── job_post_users_exports.json ├── job_post_users_imports.json ├── job_post_users_imports_input.json ├── job_post_verification_email.json ├── key.json ├── key_list.json ├── key_revoke.json ├── key_rotate.json ├── log_stream.json ├── log_streams_list.json ├── multipart_sample.json ├── organization.json ├── organization_client_grant.json ├── organization_client_grants.json ├── organization_client_grants_paged_list.json ├── organization_connection.json ├── organization_connections_list.json ├── organization_connections_paged_list.json ├── organization_member_roles_list.json ├── organization_member_roles_paged_list.json ├── organization_members_checkpoint_paged_list.json ├── organization_members_list.json ├── organization_members_paged_list.json ├── organizations_checkpoint_paged_list.json ├── organizations_list.json ├── organizations_paged_list.json ├── partials_prompt.json ├── password_change_ticket.json ├── prompt.json ├── rate_limit_error.json ├── recovery_code.json ├── refresh_token.json ├── resource_server.json ├── resource_servers_list.json ├── resource_servers_paged_list.json ├── role.json ├── role_permissions_list.json ├── role_permissions_paged_list.json ├── role_users_checkpoint_paged_list.json ├── role_users_list.json ├── role_users_paged_list.json ├── roles_list.json ├── roles_paged_list.json ├── rule.json ├── rules_config.json ├── rules_configs_list.json ├── rules_list.json ├── rules_paged_list.json ├── scope.json ├── self_service_profile.json ├── self_service_profile_custom_text.json ├── self_service_profile_response.json ├── self_service_profile_sso_ticket.json ├── self_service_profile_sso_ticket_request.json ├── self_service_profiles_list.json ├── session.json ├── suspicious_ip_throttling_configuration.json ├── tenant.json ├── user.json ├── user_blocks.json ├── user_permissions_paged_list.json ├── user_refresh_tokens.json ├── user_roles_paged_list.json ├── user_sessions.json ├── users_list.json └── users_paged_list.json └── mockito-extensions └── org.mockito.plugins.MockMaker /.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | precision: 2 3 | round: down 4 | range: "70...100" 5 | status: 6 | patch: 7 | default: 8 | if_no_uploads: error 9 | changes: true 10 | project: 11 | default: 12 | target: auto 13 | if_no_uploads: error 14 | comment: false -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | charset = utf-8 10 | insert_final_newline = true 11 | indent_style = space 12 | 13 | [*.{java,groovy,kt}] 14 | indent_size = 4 15 | continuation_indent_size = 4 16 | wildcard_import_limit = 9999 17 | 18 | [*.gradle] 19 | indent_size = 2 20 | 21 | [Makefile] 22 | indent_style = tab -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @auth0/project-dx-sdks-engineer-codeowner 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Auth0 Community 4 | url: https://community.auth0.com 5 | about: Discuss this SDK in the Auth0 Community forums 6 | -------------------------------------------------------------------------------- /.github/actions/get-prerelease/action.yml: -------------------------------------------------------------------------------- 1 | name: Return a boolean indicating if the version contains prerelease identifiers 2 | 3 | # 4 | # Returns a simple true/false boolean indicating whether the version indicates it's a prerelease or not. 5 | # 6 | # TODO: Remove once the common repo is public. 7 | # 8 | 9 | inputs: 10 | version: 11 | required: true 12 | 13 | outputs: 14 | prerelease: 15 | value: ${{ steps.get_prerelease.outputs.PRERELEASE }} 16 | 17 | runs: 18 | using: composite 19 | 20 | steps: 21 | - id: get_prerelease 22 | shell: bash 23 | run: | 24 | if [[ "${VERSION}" == *"beta"* || "${VERSION}" == *"alpha"* ]]; then 25 | echo "PRERELEASE=true" >> $GITHUB_OUTPUT 26 | else 27 | echo "PRERELEASE=false" >> $GITHUB_OUTPUT 28 | fi 29 | env: 30 | VERSION: ${{ inputs.version }} 31 | -------------------------------------------------------------------------------- /.github/actions/get-version/action.yml: -------------------------------------------------------------------------------- 1 | name: Return the version extracted from the branch name 2 | 3 | # 4 | # Returns the version from the .version file. 5 | # 6 | # TODO: Remove once the common repo is public. 7 | # 8 | 9 | outputs: 10 | version: 11 | value: ${{ steps.get_version.outputs.VERSION }} 12 | 13 | runs: 14 | using: composite 15 | 16 | steps: 17 | - id: get_version 18 | shell: bash 19 | run: | 20 | VERSION=$(head -1 .version) 21 | echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT 22 | -------------------------------------------------------------------------------- /.github/actions/release-create/action.yml: -------------------------------------------------------------------------------- 1 | name: Create a GitHub release 2 | 3 | # 4 | # Creates a GitHub release with the given version. 5 | # 6 | # TODO: Remove once the common repo is public. 7 | # 8 | 9 | inputs: 10 | token: 11 | required: true 12 | files: 13 | required: false 14 | name: 15 | required: true 16 | body: 17 | required: true 18 | tag: 19 | required: true 20 | commit: 21 | required: true 22 | draft: 23 | default: false 24 | required: false 25 | prerelease: 26 | default: false 27 | required: false 28 | fail_on_unmatched_files: 29 | default: true 30 | required: false 31 | 32 | runs: 33 | using: composite 34 | 35 | steps: 36 | - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 37 | with: 38 | body: ${{ inputs.body }} 39 | name: ${{ inputs.name }} 40 | tag_name: ${{ inputs.tag }} 41 | target_commitish: ${{ inputs.commit }} 42 | draft: ${{ inputs.draft }} 43 | prerelease: ${{ inputs.prerelease }} 44 | fail_on_unmatched_files: ${{ inputs.fail_on_unmatched_files }} 45 | files: ${{ inputs.files }} 46 | env: 47 | GITHUB_TOKEN: ${{ inputs.token }} 48 | -------------------------------------------------------------------------------- /.github/actions/tag-exists/action.yml: -------------------------------------------------------------------------------- 1 | name: Return a boolean indicating if a tag already exists for the repository 2 | 3 | # 4 | # Returns a simple true/false boolean indicating whether the tag exists or not. 5 | # 6 | # TODO: Remove once the common repo is public. 7 | # 8 | 9 | inputs: 10 | token: 11 | required: true 12 | tag: 13 | required: true 14 | 15 | outputs: 16 | exists: 17 | description: 'Whether the tag exists or not' 18 | value: ${{ steps.tag-exists.outputs.EXISTS }} 19 | 20 | runs: 21 | using: composite 22 | 23 | steps: 24 | - id: tag-exists 25 | shell: bash 26 | run: | 27 | GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG_NAME}" 28 | http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s -H "Authorization: token ${GITHUB_TOKEN}") 29 | if [ "$http_status_code" -ne "404" ] ; then 30 | echo "EXISTS=true" >> $GITHUB_OUTPUT 31 | else 32 | echo "EXISTS=false" >> $GITHUB_OUTPUT 33 | fi 34 | env: 35 | TAG_NAME: ${{ inputs.tag }} 36 | GITHUB_TOKEN: ${{ inputs.token }} 37 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | 8 | - package-ecosystem: "gradle" 9 | directory: "lib" 10 | schedule: 11 | interval: "daily" 12 | ignore: 13 | - dependency-name: "*" 14 | update-types: ["version-update:semver-major"] 15 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an Issue or Pull Request becomes stale 4 | daysUntilStale: 90 5 | 6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. 7 | daysUntilClose: 7 8 | 9 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable 10 | exemptLabels: [] 11 | 12 | # Set to true to ignore issues with an assignee (defaults to false) 13 | exemptAssignees: true 14 | 15 | # Label to use when marking as stale 16 | staleLabel: closed:stale 17 | 18 | # Comment to post when marking as stale. Set to `false` to disable 19 | markComment: > 20 | This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️ -------------------------------------------------------------------------------- /.github/workflows/build-and-test.yml: -------------------------------------------------------------------------------- 1 | name: auth0/auth0-java/build-and-test 2 | 3 | on: 4 | pull_request: 5 | merge_group: 6 | push: 7 | branches: ["master", "main", "v1"] 8 | 9 | jobs: 10 | gradle: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - uses: actions/setup-java@v4 15 | with: 16 | distribution: temurin 17 | java-version: 8 18 | - uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff 19 | with: 20 | arguments: assemble apiDiff check jacocoTestReport --continue --console=plain 21 | - uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c 22 | with: 23 | flags: unittests 24 | - uses: actions/upload-artifact@v4 25 | with: 26 | name: Reports 27 | path: build/reports 28 | -------------------------------------------------------------------------------- /.github/workflows/gradle-wrapper-validation.yml: -------------------------------------------------------------------------------- 1 | name: "Validate Gradle Wrapper" 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | validation: 6 | name: "validation/gradlew" 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v4 10 | - uses: gradle/wrapper-validation-action@216d1ad2b3710bf005dc39237337b9673fd8fcd5 # pin@3.3.2 11 | -------------------------------------------------------------------------------- /.github/workflows/semgrep.yml: -------------------------------------------------------------------------------- 1 | name: Semgrep 2 | 3 | on: 4 | merge_group: 5 | pull_request: 6 | types: 7 | - opened 8 | - synchronize 9 | push: 10 | branches: 11 | - master 12 | schedule: 13 | - cron: '30 0 1,15 * *' 14 | 15 | permissions: 16 | contents: read 17 | 18 | concurrency: 19 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 20 | cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} 21 | 22 | jobs: 23 | 24 | run: 25 | name: Check for Vulnerabilities 26 | runs-on: ubuntu-latest 27 | 28 | container: 29 | image: returntocorp/semgrep 30 | 31 | steps: 32 | - if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group' 33 | run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection. 34 | 35 | - uses: actions/checkout@v4 36 | with: 37 | ref: ${{ github.event.pull_request.head.sha || github.ref }} 38 | 39 | - run: semgrep ci 40 | env: 41 | SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} 42 | -------------------------------------------------------------------------------- /.github/workflows/snyk.yml: -------------------------------------------------------------------------------- 1 | name: Snyk 2 | 3 | on: 4 | merge_group: 5 | workflow_dispatch: 6 | pull_request: 7 | types: 8 | - opened 9 | - synchronize 10 | push: 11 | branches: 12 | - master 13 | schedule: 14 | - cron: '30 0 1,15 * *' 15 | 16 | permissions: 17 | contents: read 18 | 19 | concurrency: 20 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 21 | cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} 22 | 23 | jobs: 24 | 25 | check: 26 | name: Check for Vulnerabilities 27 | runs-on: ubuntu-latest 28 | 29 | steps: 30 | - if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group' 31 | run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection. 32 | 33 | - uses: actions/checkout@v4 34 | with: 35 | ref: ${{ github.event.pull_request.head.sha || github.ref }} 36 | 37 | - uses: snyk/actions/gradle-jdk11@b98d498629f1c368650224d6d212bf7dfa89e4bf # pin@0.4.0 38 | env: 39 | SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} 40 | -------------------------------------------------------------------------------- /.semgrepignore: -------------------------------------------------------------------------------- 1 | src/test/ 2 | -------------------------------------------------------------------------------- /.shiprc: -------------------------------------------------------------------------------- 1 | { 2 | "files": { 3 | "README.md": [], 4 | ".version": [], 5 | "build.gradle": ["version = \"{MAJOR}.{MINOR}.{PATCH}\""] 6 | }, 7 | "prefixVersion": false 8 | } 9 | -------------------------------------------------------------------------------- /.snyk: -------------------------------------------------------------------------------- 1 | # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. 2 | version: v1.25.0 3 | # ignores vulnerabilities until expiry date; change duration by modifying expiry date 4 | ignore: 5 | SNYK-JAVA-ORGJETBRAINSKOTLIN-2393744: 6 | - '*': 7 | reason: 'unaffected, only affects createTempFile and createTempDir kotlin function, which are not used' 8 | expires: 2024-12-31T00:00:00.000Z 9 | SNYK-JAVA-ORGBOUNCYCASTLE-5771339: 10 | - '*': 11 | reason: 'test-only dependency, no update available' 12 | expires: 2024-12-31T00:00:00.000Z 13 | SNYK-JAVA-ORGBOUNCYCASTLE-6084022: 14 | - '*': 15 | reason: 'test-only dependency, no update available' 16 | expires: 2024-12-31T00:00:00.000Z 17 | SNYK-JAVA-ORGBOUNCYCASTLE-6277380: 18 | - '*': 19 | reason: 'test-only dependency, no update available' 20 | expires: 2024-12-31T00:00:00.000Z 21 | SNYK-JAVA-ORGBOUNCYCASTLE-6613080: 22 | - '*': 23 | reason: 'test-only dependency, no update available' 24 | expires: 2024-12-31T00:00:00.000Z 25 | patch: {} 26 | -------------------------------------------------------------------------------- /.version: -------------------------------------------------------------------------------- 1 | 2.21.0 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Auth0, Inc. (http://auth0.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | GROUP=com.auth0 2 | POM_ARTIFACT_ID=auth0 3 | VERSION_NAME=2.12.0 4 | 5 | POM_NAME=auth0-java 6 | POM_DESCRIPTION=Java client library for the Auth0 platform 7 | POM_PACKAGING=jar 8 | 9 | POM_URL=https://github.com/auth0/auth0-java 10 | POM_SCM_URL=https://github.com/auth0/auth0-java 11 | 12 | POM_SCM_CONNECTION=scm:git:https://github.com/auth0/auth0-java.git 13 | POM_SCM_DEV_CONNECTION=scm:git:https://github.com/auth0/auth0-java.git 14 | 15 | POM_LICENCE_NAME=The MIT License (MIT) 16 | POM_LICENCE_URL=https://raw.githubusercontent.com/auth0/auth0-java/master/LICENSE 17 | POM_LICENCE_DIST=repo 18 | 19 | POM_DEVELOPER_ID=auth0 20 | POM_DEVELOPER_NAME=Auth0 21 | POM_DEVELOPER_EMAIL=oss@auth0.com 22 | -------------------------------------------------------------------------------- /gradle/versioning.gradle: -------------------------------------------------------------------------------- 1 | def getVersionFromFile() { 2 | def versionFile = rootProject.file('.version') 3 | return versionFile.text.readLines().first().trim() 4 | } 5 | 6 | def isSnapshot() { 7 | return hasProperty('isSnapshot') ? isSnapshot.toBoolean() : true 8 | } 9 | 10 | def getVersionName() { 11 | return isSnapshot() ? project.version+"-SNAPSHOT" : project.version 12 | } 13 | 14 | ext { 15 | getVersionName = this.&getVersionName 16 | getVersionFromFile = this.&getVersionFromFile 17 | } 18 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auth0/auth0-java/0be01441bec6cb4dcd9d7121dd08c221858bb984/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /opslevel.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 1 3 | repository: 4 | owner: dx_sdks 5 | tier: 6 | tags: 7 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | } 5 | } 6 | 7 | rootProject.name = 'auth0' 8 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/client/auth/ClientAssertionSigner.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.auth; 2 | 3 | /** 4 | * Responsible for creating a signed client assertion used to authenticate to the Authentication API 5 | * 6 | * @see OpenID Connect Core Specification 7 | */ 8 | public interface ClientAssertionSigner { 9 | 10 | /** 11 | * Creates a signed JWT representing a client assertion used to authenticate to the Authentication API. 12 | * 13 | * @param issuer the Issuer. This MUST contain the client_id of the OAuth Client. 14 | * @param audience the audience that identifies the Authorization Server as an intended audience. 15 | * @param subject the Subject. This MUST contain the client_id of the OAuth Client. 16 | 17 | * @return a signed JWT representing the client assertion. 18 | */ 19 | String createSignedClientAssertion(String issuer, String audience, String subject); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/client/auth/PasswordlessEmailType.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.auth; 2 | 3 | /** 4 | * Represents the type of the Passwordless email request. 5 | */ 6 | public enum PasswordlessEmailType { 7 | 8 | /** 9 | * Send a link. 10 | */ 11 | LINK("link"), 12 | 13 | /** 14 | * Send a code. 15 | */ 16 | CODE("code"); 17 | 18 | private final String type; 19 | 20 | PasswordlessEmailType(String type) { 21 | this.type = type; 22 | } 23 | 24 | /** 25 | * Gets the type of Passwordless email request. 26 | * 27 | * @return the type of Passwordless email request. 28 | */ 29 | public String getType() { 30 | return type; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/client/mgmt/SimpleTokenProvider.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.mgmt; 2 | 3 | import com.auth0.utils.Asserts; 4 | 5 | import java.util.concurrent.CompletableFuture; 6 | 7 | /** 8 | * An implementation of {@link TokenProvider} that simply returns the token it is configured with. Tokens will not be renewed; 9 | * consumers are responsible for renewing the token when needed and then calling {@link ManagementAPI#setApiToken(String)} with the 10 | * new token. 11 | */ 12 | public class SimpleTokenProvider implements TokenProvider { 13 | private final String apiToken; 14 | 15 | public static SimpleTokenProvider create(String apiToken) { 16 | return new SimpleTokenProvider(apiToken); 17 | } 18 | 19 | @Override 20 | public String getToken() { 21 | return apiToken; 22 | } 23 | 24 | @Override 25 | public CompletableFuture getTokenAsync() { 26 | return CompletableFuture.supplyAsync(() -> apiToken); 27 | } 28 | 29 | private SimpleTokenProvider(String apiToken) { 30 | Asserts.assertNotNull(apiToken, "api token"); 31 | this.apiToken = apiToken; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/client/mgmt/TokenProvider.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.mgmt; 2 | 3 | import com.auth0.exception.Auth0Exception; 4 | 5 | import java.util.concurrent.CompletableFuture; 6 | 7 | /** 8 | * A {@code TokenProvider} is responsible for providing the token used when making authorized requests to the Auth0 9 | * Management API. 10 | */ 11 | public interface TokenProvider { 12 | 13 | /** 14 | * Responsible for obtaining a token for use with the {@link ManagementAPI} client for synchronous requests. 15 | * @return the token required when making requests to the Auth0 Management API. 16 | * @throws Auth0Exception if the token cannot be retrieved. 17 | */ 18 | String getToken() throws Auth0Exception; 19 | 20 | /** 21 | * Responsible for obtaining a token for use with the {@link ManagementAPI} client for asynchronous requests. 22 | * @return a {@link CompletableFuture} with the token required when making requests to the Auth0 Management API. 23 | */ 24 | CompletableFuture getTokenAsync(); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/client/mgmt/filter/BaseFilter.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.mgmt.filter; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Base class that keeps the parameters that each filter requires. 8 | *

9 | * This class is not thread-safe: 10 | * It makes use of {@link HashMap} for storing the parameters. Make sure to not call the builder methods 11 | * from a different or un-synchronized thread. 12 | */ 13 | public abstract class BaseFilter { 14 | protected final Map parameters = new HashMap<>(); 15 | 16 | public Map getAsMap() { 17 | return parameters; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/client/mgmt/filter/EnabledClientsFilter.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.mgmt.filter; 2 | 3 | public class EnabledClientsFilter extends BaseFilter { 4 | /** 5 | * Include the {@code from} parameter to specify where to start the page selection. Only applicable for endpoints that 6 | * support checkpoint pagination. 7 | * 8 | * @param from the ID from which to start selection. This can be obtained from the {@code next} field returned from 9 | * a checkpoint-paginated result. 10 | * @return this filter instance. 11 | */ 12 | public EnabledClientsFilter withFrom(String from) { 13 | parameters.put("from", from); 14 | return this; 15 | } 16 | 17 | /** 18 | * Include the {@code take} parameter to specify the amount of results to return per page. Only applicable for endpoints that 19 | * support checkpoint pagination. 20 | * 21 | * @param take the amount of entries to retrieve per page. 22 | * @return this filter instance. 23 | */ 24 | public EnabledClientsFilter withTake(int take) { 25 | parameters.put("take", take); 26 | return this; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/client/mgmt/filter/EncryptionKeyFilter.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.mgmt.filter; 2 | 3 | public class EncryptionKeyFilter extends BaseFilter { 4 | 5 | /** 6 | * Filter by page 7 | * 8 | * @param pageNumber the page number to retrieve. 9 | * @param amountPerPage the amount of items per page to retrieve. 10 | * @return this filter instance 11 | */ 12 | public EncryptionKeyFilter withPage(int pageNumber, int amountPerPage) { 13 | parameters.put("page", pageNumber); 14 | parameters.put("per_page", amountPerPage); 15 | return this; 16 | } 17 | 18 | /** 19 | * Include the query summary 20 | * 21 | * @param includeTotals whether to include or not the query summary. 22 | * @return this filter instance 23 | */ 24 | public EncryptionKeyFilter withTotals(boolean includeTotals) { 25 | parameters.put("include_totals", includeTotals); 26 | return this; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/client/mgmt/filter/FieldsFilter.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.mgmt.filter; 2 | 3 | /** 4 | * Class used to filter the results received when calling an Auth0 endpoint. 5 | *

6 | * This class is not thread-safe. 7 | * 8 | * @see BaseFilter 9 | */ 10 | public class FieldsFilter extends BaseFilter { 11 | 12 | /** 13 | * Only retrieve certain fields from the item. 14 | * 15 | * @param fields a list of comma separated fields to retrieve. 16 | * @param includeFields whether to include or exclude in the response the fields that were given. 17 | * @return this filter instance 18 | */ 19 | public FieldsFilter withFields(String fields, boolean includeFields) { 20 | parameters.put("fields", fields); 21 | parameters.put("include_fields", includeFields); 22 | return this; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/client/mgmt/filter/PageBasedPaginationFilter.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.mgmt.filter; 2 | 3 | /** 4 | * Class that represents a filter to be used when requesting a list of items with pagination. 5 | */ 6 | public class PageBasedPaginationFilter extends BaseFilter{ 7 | 8 | /** 9 | * Filter by page 10 | * 11 | * @param pageNumber the page number to retrieve. 12 | * @param amountPerPage the amount of items per page to retrieve. 13 | * @return this filter instance 14 | */ 15 | public PageBasedPaginationFilter withPage(int pageNumber, int amountPerPage) { 16 | parameters.put("page", pageNumber); 17 | parameters.put("per_page", amountPerPage); 18 | return this; 19 | } 20 | 21 | /** 22 | * Include the query summary 23 | * 24 | * @param includeTotals whether to include or not the query summary. 25 | * @return this filter instance 26 | */ 27 | public PageBasedPaginationFilter withTotals(boolean includeTotals) { 28 | parameters.put("include_totals", includeTotals); 29 | return this; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/exception/Auth0Exception.java: -------------------------------------------------------------------------------- 1 | package com.auth0.exception; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * Class that represents an error captured when executing an http request to the Auth0 Server. 7 | */ 8 | @SuppressWarnings("WeakerAccess") 9 | public class Auth0Exception extends IOException { 10 | 11 | public Auth0Exception(String message) { 12 | super(message); 13 | } 14 | 15 | public Auth0Exception(String message, Throwable cause) { 16 | super(message, cause); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/exception/ClientAssertionSigningException.java: -------------------------------------------------------------------------------- 1 | package com.auth0.exception; 2 | 3 | /** 4 | * Reqpresents an exception when creating the signed client assertion. 5 | */ 6 | public class ClientAssertionSigningException extends RuntimeException { 7 | 8 | /** 9 | * Create a new instance. 10 | * 11 | * @param message the message of the exception. 12 | */ 13 | public ClientAssertionSigningException(String message) { 14 | super(message); 15 | } 16 | 17 | /** 18 | * Create a new instance. 19 | * 20 | * @param message the message of the exception. 21 | * @param cause the cause of the exception. 22 | */ 23 | public ClientAssertionSigningException(String message, Throwable cause) { 24 | super(message, cause); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/exception/IdTokenValidationException.java: -------------------------------------------------------------------------------- 1 | package com.auth0.exception; 2 | 3 | /** 4 | * Represents an error during the validation of an OIDC-compliant token. 5 | */ 6 | public class IdTokenValidationException extends RuntimeException { 7 | 8 | /** 9 | * Creates a new {@code IdTokenValidationException}. 10 | * 11 | * @param message the exception message. 12 | */ 13 | public IdTokenValidationException(String message) { 14 | super(message); 15 | } 16 | 17 | /** 18 | * Creates a new {@code IdTokenValidationException}. 19 | * 20 | * @param message the exception message. 21 | * @param cause the cause of the exception. 22 | */ 23 | public IdTokenValidationException(String message, Throwable cause) { 24 | super(message, cause); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/exception/PublicKeyProviderException.java: -------------------------------------------------------------------------------- 1 | package com.auth0.exception; 2 | 3 | 4 | /** 5 | * Represents an error when attempting to retrieve a public key. 6 | * @see com.auth0.utils.tokens.PublicKeyProvider 7 | */ 8 | @SuppressWarnings("unused") 9 | public class PublicKeyProviderException extends Exception { 10 | 11 | /** 12 | * Creates a new {@code PublicKeyProviderException} 13 | * 14 | * @param message the exception message 15 | */ 16 | public PublicKeyProviderException(String message) { 17 | super(message); 18 | } 19 | 20 | /** 21 | * Creates a new {@code PublicKeyProviderException} 22 | * 23 | * @param message the exception message 24 | * @param cause the cause of the exception 25 | */ 26 | public PublicKeyProviderException(String message, Throwable cause) { 27 | super(message, cause); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/ObjectMapperProvider.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | 5 | /** 6 | * Provides access to a single {@link ObjectMapper} instance for the serialization and deserialization of JSON data. 7 | * This class is for internal use only and is subject to change without notice. 8 | */ 9 | public class ObjectMapperProvider { 10 | 11 | private static final ObjectMapper objectMapper = new ObjectMapper(); 12 | 13 | // prevent instantiation 14 | private ObjectMapperProvider() {} 15 | 16 | /** 17 | * @return the {@code ObjectMapper} instance to process JSON data 18 | */ 19 | public static ObjectMapper getMapper() { 20 | return objectMapper; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/auth/BackChannelTokenResponse.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.auth; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class BackChannelTokenResponse { 10 | @JsonProperty("access_token") 11 | private String accessToken; 12 | @JsonProperty("id_token") 13 | private String idToken; 14 | @JsonProperty("expires_in") 15 | private long expiresIn; 16 | @JsonProperty("scope") 17 | private String scope; 18 | 19 | public String getAccessToken() { 20 | return accessToken; 21 | } 22 | 23 | public String getIdToken() { 24 | return idToken; 25 | } 26 | 27 | public long getExpiresIn() { 28 | return expiresIn; 29 | } 30 | 31 | public String getScope() { 32 | return scope; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/auth/CreatedOtpResponse.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.auth; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | @JsonInclude(JsonInclude.Include.NON_NULL) 11 | public class CreatedOtpResponse { 12 | 13 | @JsonProperty("secret") 14 | private String secret; 15 | 16 | @JsonProperty("barcode_uri") 17 | private String barcodeUri; 18 | 19 | @JsonProperty("authenticator_type") 20 | private String authenticatorType; 21 | 22 | @JsonProperty("recovery_codes") 23 | private List recoveryCodes; 24 | 25 | public String getSecret() { 26 | return secret; 27 | } 28 | 29 | public String getBarcodeUri() { 30 | return barcodeUri; 31 | } 32 | 33 | public String getAuthenticatorType() { 34 | return authenticatorType; 35 | } 36 | 37 | public List getRecoveryCodes() { 38 | return recoveryCodes; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/auth/MfaAuthenticator.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.auth; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class MfaAuthenticator { 10 | 11 | @JsonProperty("id") 12 | private String id; 13 | 14 | @JsonProperty("authenticator_type") 15 | private String authenticatorType; 16 | 17 | @JsonProperty("active") 18 | private boolean active; 19 | 20 | @JsonProperty("name") 21 | private String name; 22 | 23 | @JsonProperty("oob_channel") 24 | private String oobChannel; 25 | 26 | public String getId() { 27 | return id; 28 | } 29 | 30 | public String getAuthenticatorType() { 31 | return authenticatorType; 32 | } 33 | 34 | public boolean isActive() { 35 | return active; 36 | } 37 | 38 | public String getName() { 39 | return name; 40 | } 41 | 42 | public String getOobChannel() { 43 | return oobChannel; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/auth/MfaChallengeResponse.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.auth; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class MfaChallengeResponse { 10 | 11 | @JsonProperty("challenge_type") 12 | private String challengeType; 13 | 14 | @JsonProperty("binding_method") 15 | private String bindingMethod; 16 | 17 | @JsonProperty("oob_code") 18 | private String oobCode; 19 | 20 | public String getChallengeType() { 21 | return challengeType; 22 | } 23 | 24 | public String getBindingMethod() { 25 | return bindingMethod; 26 | } 27 | 28 | public String getOobCode() { 29 | return oobCode; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/auth/PushedAuthorizationResponse.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.auth; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | /** 9 | * Represents the response from a Pushed Authorization Request (PAR). 10 | */ 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | public class PushedAuthorizationResponse { 14 | 15 | @JsonProperty("request_uri") 16 | private String requestURI; 17 | @JsonProperty("expires_in") 18 | private Integer expiresIn; 19 | 20 | @JsonCreator 21 | public PushedAuthorizationResponse(@JsonProperty("request_uri") String requestURI, @JsonProperty("expires_in") Integer expiresIn) { 22 | this.requestURI = requestURI; 23 | this.expiresIn = expiresIn; 24 | } 25 | 26 | public String getRequestURI() { 27 | return requestURI; 28 | } 29 | 30 | public Integer getExpiresIn() { 31 | return expiresIn; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/ActionsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Represents a page of an Action. 12 | * @see Action 13 | * @see com.auth0.client.mgmt.ActionsEntity 14 | */ 15 | @JsonIgnoreProperties(ignoreUnknown = true) 16 | @JsonInclude(JsonInclude.Include.NON_NULL) 17 | @JsonDeserialize(using = ActionsPageDeserializer.class) 18 | public class ActionsPage extends Page { 19 | public ActionsPage(List items) { 20 | super(items); 21 | } 22 | 23 | public ActionsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | public ActionsPage(Integer start, Integer length, Integer total, Integer limit, String next, List items) { 28 | super(start, length, total, limit, next, items); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/ActionsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a paged response into its {@linkplain ActionsPage} representation. 9 | */ 10 | public class ActionsPageDeserializer extends PageDeserializer { 11 | 12 | protected ActionsPageDeserializer() { 13 | super(Action.class, "actions"); 14 | } 15 | 16 | @Override 17 | protected ActionsPage createPage(List items) { 18 | return new ActionsPage(items); 19 | } 20 | 21 | @Override 22 | protected ActionsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 23 | return new ActionsPage(start, length, total, limit, items); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/BindingsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Represents a page of an action trigger binding. 12 | * @see Binding 13 | * @see com.auth0.client.mgmt.ActionsEntity 14 | */ 15 | @JsonIgnoreProperties(ignoreUnknown = true) 16 | @JsonInclude(JsonInclude.Include.NON_NULL) 17 | @JsonDeserialize(using = BindingsPageDeserializer.class) 18 | public class BindingsPage extends Page { 19 | public BindingsPage(List items) { 20 | super(items); 21 | } 22 | 23 | public BindingsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | public BindingsPage(Integer start, Integer length, Integer total, Integer limit, String next, List items) { 28 | super(start, length, total, limit, next, items); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/BindingsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a paged response into its {@linkplain ActionsPage} representation. 9 | */ 10 | public class BindingsPageDeserializer extends PageDeserializer { 11 | 12 | protected BindingsPageDeserializer() { 13 | super(Binding.class, "bindings"); 14 | } 15 | 16 | @Override 17 | protected BindingsPage createPage(List items) { 18 | return new BindingsPage(items); 19 | } 20 | 21 | @Override 22 | protected BindingsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 23 | return new BindingsPage(start, length, total, limit, items); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/BindingsUpdateRequest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Represents the request body when updating a trigger's action bindings. 12 | * @see com.auth0.client.mgmt.ActionsEntity 13 | */ 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | public class BindingsUpdateRequest { 17 | 18 | @JsonProperty("bindings") 19 | private List bindingUpdates; 20 | 21 | /** 22 | * Creates a new instance 23 | * 24 | * @param bindingUpdates a list of binding updates 25 | */ 26 | @JsonCreator 27 | public BindingsUpdateRequest(@JsonProperty("bindings") List bindingUpdates) { 28 | this.bindingUpdates = bindingUpdates; 29 | } 30 | 31 | /** 32 | * @return the binding updates associated with this instance. 33 | */ 34 | public List getBindingUpdates() { 35 | return bindingUpdates; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/Error.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | /** 8 | * Represents an error of an Action execution. 9 | * @see Execution 10 | * @see ExecutionResult 11 | * @see com.auth0.client.mgmt.ActionsEntity 12 | */ 13 | @JsonIgnoreProperties(ignoreUnknown = true) 14 | @JsonInclude(JsonInclude.Include.NON_NULL) 15 | public class Error { 16 | 17 | @JsonProperty("id") 18 | private String id; 19 | @JsonProperty("msg") 20 | private String message; 21 | @JsonProperty("url") 22 | private String url; 23 | 24 | /** 25 | * @return the ID of this error 26 | */ 27 | public String getId() { 28 | return id; 29 | } 30 | 31 | /** 32 | * @return the message of this error 33 | */ 34 | public String getMessage() { 35 | return message; 36 | } 37 | 38 | /** 39 | * @return the URL of this error 40 | */ 41 | public String getUrl() { 42 | return url; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/ServiceStatus.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | /** 8 | * Represents the status of the actions service. 9 | * @see com.auth0.client.mgmt.ActionsEntity 10 | */ 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | public class ServiceStatus { 14 | 15 | @JsonProperty("status") 16 | private String status; 17 | 18 | /** 19 | * @return the status of the actions service. 20 | */ 21 | public String getStatus() { 22 | return status; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/Triggers.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Represents the triggers of an action. 11 | * @see Action 12 | * @see com.auth0.client.mgmt.ActionsEntity 13 | */ 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | public class Triggers { 17 | 18 | @JsonProperty("triggers") 19 | private List triggers; 20 | 21 | /** 22 | * @return the list of triggers 23 | */ 24 | public List getTriggers() { 25 | return this.triggers; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/VersionsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Represents a page of an action's versions. 12 | * @see Version 13 | * @see com.auth0.client.mgmt.ActionsEntity 14 | */ 15 | @JsonIgnoreProperties(ignoreUnknown = true) 16 | @JsonInclude(JsonInclude.Include.NON_NULL) 17 | @JsonDeserialize(using = VersionsPageDeserializer.class) 18 | public class VersionsPage extends Page { 19 | 20 | public VersionsPage(List items) { 21 | super(items); 22 | } 23 | 24 | public VersionsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 25 | super(start, length, total, limit, items); 26 | } 27 | 28 | public VersionsPage(Integer start, Integer length, Integer total, Integer limit, String next, List items) { 29 | super(start, length, total, limit, next, items); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/actions/VersionsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.actions; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a paged response into its {@linkplain VersionsPage} representation. 9 | */ 10 | public class VersionsPageDeserializer extends PageDeserializer { 11 | 12 | protected VersionsPageDeserializer() { 13 | super(Version.class, "versions"); 14 | } 15 | 16 | @Override 17 | protected VersionsPage createPage(List items) { 18 | return new VersionsPage(items); 19 | } 20 | 21 | @Override 22 | protected VersionsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 23 | return new VersionsPage(start, length, total, limit, items); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/attackprotection/BreachedPasswordStageEntry.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.attackprotection; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Represents the per-stage configuration options for BreachedPasswordStage 11 | * 12 | * @see Stage 13 | * @see com.auth0.client.mgmt.AttackProtectionEntity 14 | */ 15 | @JsonIgnoreProperties(ignoreUnknown = true) 16 | @JsonInclude(JsonInclude.Include.NON_NULL) 17 | public class BreachedPasswordStageEntry { 18 | @JsonProperty("shields") 19 | private List shields; 20 | 21 | /** 22 | * Get the shields for this Stage entry 23 | * @return the shields for this Stage entry 24 | */ 25 | public List getShields() { 26 | return shields; 27 | } 28 | 29 | /** 30 | * Sets the shields for this Stage entry 31 | * @param shields the shields for this Stage entry 32 | */ 33 | public void setShields(List shields) { 34 | this.shields = shields; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/branding/BrandingFont.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.branding; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class BrandingFont { 10 | @JsonProperty("url") 11 | private String url; 12 | 13 | /** 14 | * Getter for the url of the font. 15 | * 16 | * @return the url. 17 | */ 18 | @JsonProperty("url") 19 | public String getUrl() { 20 | return url; 21 | } 22 | 23 | /** 24 | * Sets the url of the font. 25 | */ 26 | @JsonProperty("url") 27 | public void setUrl(String url) { 28 | this.url = url; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/branding/UniversalLoginTemplate.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.branding; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class UniversalLoginTemplate { 10 | @JsonProperty("body") 11 | private String body; 12 | 13 | /** 14 | * Getter for the template body. 15 | * 16 | * @return the template body. 17 | */ 18 | @JsonProperty("body") 19 | public String getBody() { 20 | return body; 21 | } 22 | 23 | /** 24 | * Sets for the body of the template. 25 | */ 26 | @JsonProperty("body") 27 | public void setBody(String body) { 28 | this.body = body; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/branding/UniversalLoginTemplateUpdate.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.branding; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class UniversalLoginTemplateUpdate { 10 | @JsonProperty("template") 11 | private String template; 12 | 13 | /** 14 | * Getter for the template body. 15 | * 16 | * @return the template body. 17 | */ 18 | @JsonProperty("template") 19 | public String getTemplate() { 20 | return template; 21 | } 22 | 23 | /** 24 | * Sets for the body of the template. 25 | */ 26 | @JsonProperty("template") 27 | public void setTemplate(String template) { 28 | this.template = template; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/client/Addon.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.client; 2 | 3 | import com.fasterxml.jackson.annotation.*; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | @SuppressWarnings("WeakerAccess") 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | @JsonInclude(JsonInclude.Include.NON_NULL) 11 | public class Addon { 12 | 13 | @JsonUnwrapped 14 | @JsonIgnore 15 | private final Map properties; 16 | 17 | public Addon() { 18 | this.properties = new HashMap<>(); 19 | } 20 | 21 | @JsonAnySetter 22 | public void setProperty(String name, Object value) { 23 | properties.put(name, value); 24 | } 25 | 26 | @JsonAnyGetter 27 | public Map getProperties() { 28 | return properties; 29 | } 30 | 31 | public Object getProperty(String name) { 32 | return properties.get(name); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/client/ClientsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.client; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Class that represents a given page of Clients. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity. 12 | */ 13 | @SuppressWarnings({"unused", "WeakerAccess"}) 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | @JsonDeserialize(using = ClientsPageDeserializer.class) 17 | public class ClientsPage extends Page { 18 | 19 | public ClientsPage(List items) { 20 | super(items); 21 | } 22 | 23 | public ClientsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/client/ClientsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.client; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link ClientsPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.ClientsEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class ClientsPageDeserializer extends PageDeserializer { 17 | 18 | ClientsPageDeserializer() { 19 | super(Client.class, "clients"); 20 | } 21 | 22 | @Override 23 | protected ClientsPage createPage(List items) { 24 | return new ClientsPage(items); 25 | } 26 | 27 | @Override 28 | protected ClientsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 29 | return new ClientsPage(start, length, total, limit, items); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/client/PrivateKeyJwt.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.client; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Class that represents an Auth0 Application private key JWT authentication method. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity. 11 | */ 12 | @JsonIgnoreProperties(ignoreUnknown = true) 13 | @JsonInclude(JsonInclude.Include.NON_NULL) 14 | public class PrivateKeyJwt { 15 | 16 | @JsonProperty("credentials") 17 | private List credentials; 18 | 19 | /** 20 | * Create a new instance 21 | */ 22 | public PrivateKeyJwt() {} 23 | 24 | /** 25 | * Create a new instance 26 | * @param credentials the credentials to use 27 | */ 28 | public PrivateKeyJwt(List credentials) { 29 | this.credentials = credentials; 30 | } 31 | 32 | /** 33 | * @return the credentials 34 | */ 35 | public List getCredentials() { 36 | return credentials; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/client/SelfSignedTLSClientAuth.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.client; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Class that represents an Auth0 Application self-signed TLS client authentication method. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity. 11 | */ 12 | 13 | @JsonIgnoreProperties(ignoreUnknown = true) 14 | @JsonInclude(JsonInclude.Include.NON_NULL) 15 | public class SelfSignedTLSClientAuth { 16 | 17 | @JsonProperty("credentials") 18 | private List credentials; 19 | 20 | /** 21 | * Create a new instance 22 | * @param credentials the credentials to use 23 | */ 24 | public SelfSignedTLSClientAuth(@JsonProperty("credentials") List credentials) { 25 | this.credentials = credentials; 26 | } 27 | 28 | /** 29 | * @return the credentials 30 | */ 31 | public List getCredentials() { 32 | return credentials; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/client/TLSClientAuth.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.client; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Class that represents an Auth0 Application TLS client authentication method. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity. 11 | */ 12 | @JsonIgnoreProperties(ignoreUnknown = true) 13 | @JsonInclude(JsonInclude.Include.NON_NULL) 14 | public class TLSClientAuth { 15 | @JsonProperty("credentials") 16 | private List credentials; 17 | 18 | /** 19 | * Create a new instance 20 | * @param credentials the credentials to use 21 | */ 22 | public TLSClientAuth(@JsonProperty("credentials") List credentials) { 23 | this.credentials = credentials; 24 | } 25 | 26 | /** 27 | * @return the credentials 28 | */ 29 | public List getCredentials() { 30 | return credentials; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/clientgrants/ClientGrantsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.clientgrants; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Class that represents a given page of Client Grants. Related to the {@link com.auth0.client.mgmt.ClientGrantsEntity} entity. 12 | */ 13 | @SuppressWarnings({"unused", "WeakerAccess"}) 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | @JsonDeserialize(using = ClientGrantsPageDeserializer.class) 17 | public class ClientGrantsPage extends Page { 18 | 19 | public ClientGrantsPage(List items) { 20 | super(items); 21 | } 22 | 23 | public ClientGrantsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/clientgrants/ClientGrantsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.clientgrants; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link ClientGrantsPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.ClientGrantsEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class ClientGrantsPageDeserializer extends PageDeserializer { 17 | 18 | ClientGrantsPageDeserializer() { 19 | super(ClientGrant.class, "client_grants"); 20 | } 21 | 22 | @Override 23 | protected ClientGrantsPage createPage(List items) { 24 | return new ClientGrantsPage(items); 25 | } 26 | 27 | @Override 28 | protected ClientGrantsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 29 | return new ClientGrantsPage(start, length, total, limit, items); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/connections/Clients.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.connections; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonInclude(JsonInclude.Include.NON_NULL) 8 | @JsonIgnoreProperties(ignoreUnknown = true) 9 | public class Clients { 10 | @JsonProperty("client_id") 11 | private String clientId; 12 | 13 | /** 14 | * Default constructor for the Clients class. 15 | */ 16 | public Clients() { 17 | } 18 | 19 | /** 20 | * Constructor for the Clients class. 21 | * 22 | * @param clientId the client ID. 23 | */ 24 | public Clients(String clientId) { 25 | this.clientId = clientId; 26 | } 27 | 28 | /** 29 | * Getter for the client ID. 30 | * 31 | * @return the client ID. 32 | */ 33 | public String getClientId() { 34 | return clientId; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/connections/ConnectionsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.connections; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Class that represents a given page of Grants. Related to the {@link com.auth0.client.mgmt.ConnectionsEntity} entity. 12 | */ 13 | @SuppressWarnings({"unused", "WeakerAccess"}) 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | @JsonDeserialize(using = ConnectionsPageDeserializer.class) 17 | public class ConnectionsPage extends Page { 18 | 19 | public ConnectionsPage(List items) { 20 | super(items); 21 | } 22 | 23 | public ConnectionsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/connections/ConnectionsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.connections; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link ConnectionsPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.ConnectionsEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class ConnectionsPageDeserializer extends PageDeserializer { 17 | 18 | ConnectionsPageDeserializer() { 19 | super(Connection.class, "connections"); 20 | } 21 | 22 | @Override 23 | protected ConnectionsPage createPage(List items) { 24 | return new ConnectionsPage(items); 25 | } 26 | 27 | @Override 28 | protected ConnectionsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 29 | return new ConnectionsPage(start, length, total, limit, items); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/connections/EnabledClientRequest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.connections; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonInclude(JsonInclude.Include.NON_NULL) 8 | @JsonIgnoreProperties(ignoreUnknown = true) 9 | public class EnabledClientRequest { 10 | @JsonProperty("client_id") 11 | private String clientId; 12 | 13 | @JsonProperty("status") 14 | private boolean status; 15 | 16 | /** 17 | * Constructor for the EnabledClientRequest. 18 | * @param clientId 19 | * @param status 20 | */ 21 | public EnabledClientRequest(String clientId, boolean status) { 22 | this.clientId = clientId; 23 | this.status = status; 24 | } 25 | 26 | /** 27 | * Getter for the client ID. 28 | * 29 | * @return the client ID. 30 | */ 31 | public String getClientId() { 32 | return clientId; 33 | } 34 | 35 | /** 36 | * Getter for the status. 37 | * 38 | * @return the status. 39 | */ 40 | @JsonProperty("status") 41 | public boolean isStatus() { 42 | return status; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/connections/ScimTokenCreateResponse.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.connections; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonInclude(JsonInclude.Include.NON_NULL) 8 | @JsonIgnoreProperties(ignoreUnknown = true) 9 | public class ScimTokenCreateResponse extends ScimTokenBaseResponse { 10 | @JsonProperty("token") 11 | private String token; 12 | 13 | /** 14 | * Getter for the token. 15 | * @return the token. 16 | */ 17 | public String getToken() { 18 | return token; 19 | } 20 | 21 | /** 22 | * Setter for the token. 23 | * @param token the token to set. 24 | */ 25 | public void setToken(String token) { 26 | this.token = token; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/connections/ScimTokenResponse.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.connections; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class ScimTokenResponse extends ScimTokenBaseResponse { 10 | @JsonProperty("last_used_at") 11 | private String lastUsedAt; 12 | 13 | /** 14 | * Getter for the last used at. 15 | * @return the last used at. 16 | */ 17 | public String getLastUsedAt() { 18 | return lastUsedAt; 19 | } 20 | 21 | /** 22 | * Setter for the last used at. 23 | * @param lastUsedAt the last used at to set. 24 | */ 25 | public void setLastUsedAt(String lastUsedAt) { 26 | this.lastUsedAt = lastUsedAt; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/grants/GrantsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.grants; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Class that represents a given page of Grants. Related to the {@link com.auth0.client.mgmt.GrantsEntity} entity. 12 | */ 13 | @SuppressWarnings({"unused", "WeakerAccess"}) 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | @JsonDeserialize(using = GrantsPageDeserializer.class) 17 | public class GrantsPage extends Page { 18 | 19 | public GrantsPage(List items) { 20 | super(items); 21 | } 22 | 23 | public GrantsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/grants/GrantsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.grants; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link GrantsPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.GrantsEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class GrantsPageDeserializer extends PageDeserializer { 17 | 18 | GrantsPageDeserializer() { 19 | super(Grant.class, "grants"); 20 | } 21 | 22 | @Override 23 | protected GrantsPage createPage(List items) { 24 | return new GrantsPage(items); 25 | } 26 | 27 | @Override 28 | protected GrantsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 29 | return new GrantsPage(start, length, total, limit, items); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/jobs/JobError.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.jobs; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonProperty; 5 | 6 | public class JobError { 7 | 8 | @JsonProperty("code") 9 | private String code; 10 | @JsonProperty("message") 11 | private String message; 12 | @JsonProperty("path") 13 | private String path; 14 | 15 | @JsonCreator 16 | public JobError(@JsonProperty("code") String code, @JsonProperty("message") String message, @JsonProperty("path") String path) { 17 | this.code = code; 18 | this.message = message; 19 | this.path = path; 20 | } 21 | 22 | @JsonProperty("code") 23 | public String getCode() { 24 | return code; 25 | } 26 | 27 | @JsonProperty("message") 28 | public String getMessage() { 29 | return message; 30 | } 31 | 32 | @JsonProperty("path") 33 | public String getPath() { 34 | return path; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/jobs/UsersExportField.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.jobs; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | /** 8 | * Class that represents a Users Export Job's Field object. Related to the {@link com.auth0.client.mgmt.JobsEntity} entity. 9 | */ 10 | @SuppressWarnings({"unused", "WeakerAccess"}) 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | public class UsersExportField { 14 | 15 | @JsonProperty("name") 16 | private final String name; 17 | @JsonProperty("export_as") 18 | private String exportAs; 19 | 20 | public UsersExportField(String name) { 21 | this.name = name; 22 | } 23 | 24 | public UsersExportField(@JsonProperty("name") String name, @JsonProperty("export_as") String exportAs) { 25 | this.name = name; 26 | this.exportAs = exportAs; 27 | } 28 | 29 | @JsonProperty("name") 30 | public String getName() { 31 | return name; 32 | } 33 | 34 | @JsonProperty("export_as") 35 | public String getExportAs() { 36 | return exportAs; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/keys/EncryptionKeysPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.keys; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | @SuppressWarnings({"unused", "WeakerAccess"}) 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | @JsonDeserialize(using = EncryptionKeysPageDeserializer.class) 14 | public class EncryptionKeysPage extends Page { 15 | 16 | public EncryptionKeysPage(List items) { 17 | super(items); 18 | } 19 | 20 | public EncryptionKeysPage(Integer start, Integer length, Integer total, Integer limit, List items) { 21 | super(start, length, total, limit, items); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/keys/EncryptionKeysPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.keys; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | public class EncryptionKeysPageDeserializer extends PageDeserializer { 8 | 9 | protected EncryptionKeysPageDeserializer() { 10 | super(EncryptionKey.class, "keys"); 11 | } 12 | 13 | @Override 14 | protected EncryptionKeysPage createPage(List items) { 15 | return new EncryptionKeysPage(items); 16 | } 17 | 18 | @Override 19 | protected EncryptionKeysPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 20 | return new EncryptionKeysPage(start, length, total, limit, items); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/logevents/LogEventsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.logevents; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Class that represents a given page of Log Events. Related to the {@link com.auth0.client.mgmt.LogEventsEntity} entity. 12 | */ 13 | @SuppressWarnings({"unused", "WeakerAccess"}) 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | @JsonDeserialize(using = LogEventsPageDeserializer.class) 17 | public class LogEventsPage extends Page { 18 | 19 | public LogEventsPage(List items) { 20 | super(items); 21 | } 22 | 23 | public LogEventsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/logevents/LogEventsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.logevents; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link LogEventsPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.LogEventsEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class LogEventsPageDeserializer extends PageDeserializer { 17 | 18 | protected LogEventsPageDeserializer() { 19 | super(LogEvent.class, "logs"); 20 | } 21 | 22 | @Override 23 | protected LogEventsPage createPage(List items) { 24 | return new LogEventsPage(items); 25 | } 26 | 27 | @Override 28 | protected LogEventsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 29 | return new LogEventsPage(start, length, total, limit, items); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/ConnectionsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a paged response into its {@linkplain EnabledConnectionsPage} representation. 9 | */ 10 | public class ConnectionsPageDeserializer extends PageDeserializer { 11 | protected ConnectionsPageDeserializer() { 12 | super(EnabledConnection.class, "enabled_connections"); 13 | } 14 | 15 | @Override 16 | protected EnabledConnectionsPage createPage(List items) { 17 | return new EnabledConnectionsPage(items); 18 | } 19 | 20 | @Override 21 | protected EnabledConnectionsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 22 | return new EnabledConnectionsPage(start, length, total, limit, items); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/CreateOrganizationClientGrantRequestBody.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | /** 9 | * Represents the body of the request to send when associating a client grant with an organization. 10 | * @see com.auth0.client.mgmt.OrganizationsEntity#addClientGrant(String, CreateOrganizationClientGrantRequestBody) 11 | */ 12 | @JsonIgnoreProperties(ignoreUnknown = true) 13 | @JsonInclude(JsonInclude.Include.NON_NULL) 14 | public class CreateOrganizationClientGrantRequestBody { 15 | 16 | @JsonProperty("grant_id") 17 | private String grantId; 18 | 19 | /** 20 | * Create a new instance. 21 | * @param grantId the ID of the grant. 22 | */ 23 | @JsonCreator 24 | public CreateOrganizationClientGrantRequestBody(String grantId) { 25 | this.grantId = grantId; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/EnabledConnectionsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Represents a page of the enabled connections for an organization. 12 | * @see EnabledConnection 13 | * @see com.auth0.client.mgmt.OrganizationsEntity 14 | */ 15 | @JsonIgnoreProperties(ignoreUnknown = true) 16 | @JsonInclude(JsonInclude.Include.NON_NULL) 17 | @JsonDeserialize(using = ConnectionsPageDeserializer.class) 18 | public class EnabledConnectionsPage extends Page { 19 | 20 | public EnabledConnectionsPage(List items) { 21 | super(items); 22 | } 23 | 24 | public EnabledConnectionsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 25 | super(start, length, total, limit, items); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/InvitationsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Represents a page of Invitations. 12 | * @see Invitation 13 | * @see com.auth0.client.mgmt.OrganizationsEntity 14 | */ 15 | @JsonIgnoreProperties(ignoreUnknown = true) 16 | @JsonInclude(JsonInclude.Include.NON_NULL) 17 | @JsonDeserialize(using = InvitationsPageDeserializer.class) 18 | public class InvitationsPage extends Page { 19 | 20 | public InvitationsPage(List items) { 21 | super(items); 22 | } 23 | 24 | public InvitationsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 25 | super(start, length, total, limit, items); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/InvitationsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a paged response into its {@linkplain InvitationsPage} representation. 9 | */ 10 | public class InvitationsPageDeserializer extends PageDeserializer { 11 | 12 | protected InvitationsPageDeserializer() { 13 | super(Invitation.class, "invitations"); 14 | } 15 | 16 | @Override 17 | protected InvitationsPage createPage(List items) { 18 | return new InvitationsPage(items); 19 | } 20 | 21 | @Override 22 | protected InvitationsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 23 | return new InvitationsPage(start, length, total, limit, items); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/Invitee.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | /** 8 | * Represents the Invitee object for an Invitation. 9 | * @see Invitation 10 | * @see com.auth0.client.mgmt.OrganizationsEntity 11 | */ 12 | @JsonIgnoreProperties(ignoreUnknown = true) 13 | @JsonInclude(JsonInclude.Include.NON_NULL) 14 | public class Invitee { 15 | 16 | @JsonProperty("email") 17 | private String email; 18 | 19 | /** 20 | * Create a new instance. 21 | * 22 | * @param email the email of the Invitee. 23 | */ 24 | public Invitee(@JsonProperty("email") String email) { 25 | this.email = email; 26 | } 27 | 28 | /** 29 | * @return the email of this Invitee. 30 | */ 31 | public String getEmail() { 32 | return email; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/Inviter.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | /** 8 | * Represents the Inviter object for an Invitation. 9 | * @see Invitation 10 | * @see com.auth0.client.mgmt.OrganizationsEntity 11 | */ 12 | @JsonIgnoreProperties(ignoreUnknown = true) 13 | @JsonInclude(JsonInclude.Include.NON_NULL) 14 | public class Inviter { 15 | 16 | @JsonProperty("name") 17 | private String name; 18 | 19 | /** 20 | * Create a new instance. 21 | * 22 | * @param name the name of the Inviter. 23 | */ 24 | public Inviter(@JsonProperty("name") String name) { 25 | this.name = name; 26 | } 27 | 28 | /** 29 | * @return the name of this Inviter. 30 | */ 31 | public String getName() { 32 | return name; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/Members.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Represents the request body when adding or deleting members from an organization. 12 | * @see com.auth0.client.mgmt.OrganizationsEntity 13 | */ 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | public class Members { 17 | 18 | @JsonProperty("members") 19 | private List members; 20 | 21 | /** 22 | * Create a new instance. 23 | * 24 | * @param members a list of {@linkplain Member} 25 | */ 26 | @JsonCreator 27 | public Members(@JsonProperty("members") List members) { 28 | this.members = members; 29 | } 30 | 31 | /** 32 | * @return the list of members. 33 | */ 34 | public List getMembers() { 35 | return members; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/MembersPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a paged response into its {@linkplain MembersPage} representation. 9 | */ 10 | public class MembersPageDeserializer extends PageDeserializer { 11 | 12 | protected MembersPageDeserializer() { 13 | super(Member.class, "members"); 14 | } 15 | 16 | @Override 17 | protected MembersPage createPage(List items) { 18 | return new MembersPage(items); 19 | } 20 | 21 | @Override 22 | @SuppressWarnings("deprecation") 23 | protected MembersPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | return new MembersPage(start, length, total, limit, items); 25 | } 26 | 27 | @Override 28 | protected MembersPage createPage(Integer start, Integer length, Integer total, Integer limit, String next, List items) { 29 | return new MembersPage(start, length, total, limit, next, items); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/OrganizationClientGrantsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Represents a page of a response when getting the client grants associated with an organization. 12 | * @see OrganizationClientGrant 13 | */ 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | @JsonDeserialize(using = OrganizationClientGrantsPageDeserializer.class) 17 | public class OrganizationClientGrantsPage extends Page { 18 | 19 | public OrganizationClientGrantsPage(List items) { 20 | super(items); 21 | } 22 | 23 | public OrganizationClientGrantsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/OrganizationClientGrantsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a paged response into its {@linkplain OrganizationClientGrant} representation. 9 | */ 10 | public class OrganizationClientGrantsPageDeserializer extends PageDeserializer { 11 | 12 | OrganizationClientGrantsPageDeserializer() { 13 | super(OrganizationClientGrant.class, "client_grants"); 14 | } 15 | 16 | @Override 17 | protected OrganizationClientGrantsPage createPage(List items) { 18 | return new OrganizationClientGrantsPage(items); 19 | } 20 | 21 | @Override 22 | protected OrganizationClientGrantsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 23 | return new OrganizationClientGrantsPage(start, length, total, limit, items); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/OrganizationsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a paged response into its {@linkplain OrganizationsPage} representation. 9 | */ 10 | public class OrganizationsPageDeserializer extends PageDeserializer { 11 | 12 | protected OrganizationsPageDeserializer() { 13 | super(Organization.class, "organizations"); 14 | } 15 | 16 | @Override 17 | protected OrganizationsPage createPage(List items) { 18 | return new OrganizationsPage(items); 19 | } 20 | 21 | @Override 22 | @SuppressWarnings("deprecation") 23 | protected OrganizationsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | return new OrganizationsPage(start, length, total, limit, items); 25 | } 26 | 27 | @Override 28 | protected OrganizationsPage createPage(Integer start, Integer length, Integer total, Integer limit, String next, List items) { 29 | return new OrganizationsPage(start, length, total, limit, next, items); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/organizations/Roles.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.organizations; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Represents the request body when adding or deleting roles from a member of an organization. 11 | * @see com.auth0.client.mgmt.OrganizationsEntity 12 | */ 13 | @JsonIgnoreProperties(ignoreUnknown = true) 14 | @JsonInclude(JsonInclude.Include.NON_NULL) 15 | public class Roles { 16 | 17 | @JsonProperty("roles") 18 | private List roles; 19 | 20 | /** 21 | * Create a new instance. 22 | * 23 | * @param roles the list of Role IDs to associate with the member. 24 | */ 25 | public Roles(List roles) { 26 | this.roles = roles; 27 | } 28 | 29 | /** 30 | * @return the list of Role IDs associated with the member. 31 | */ 32 | public List getRoles() { 33 | return roles; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/permissions/PermissionsPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.permissions; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | @SuppressWarnings({"unused", "WeakerAccess"}) 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | @JsonDeserialize(using = PermissionsPageDeserializer.class) 14 | public class PermissionsPage extends Page { 15 | 16 | public PermissionsPage(List items) { 17 | super(items); 18 | } 19 | 20 | public PermissionsPage(Integer start, Integer length, Integer total, Integer limit, List items) { 21 | super(start, length, total, limit, items); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/permissions/PermissionsPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.permissions; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link PermissionsPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.RolesEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class PermissionsPageDeserializer extends PageDeserializer { 17 | 18 | PermissionsPageDeserializer() { 19 | super(Permission.class, "permissions"); 20 | } 21 | 22 | @Override 23 | protected PermissionsPage createPage(List items) { 24 | return new PermissionsPage(items); 25 | } 26 | 27 | @Override 28 | protected PermissionsPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 29 | return new PermissionsPage(start, length, total, limit, items); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/refreshtokens/ResourceServer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.refreshtokens; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | @JsonInclude(JsonInclude.Include.NON_NULL) 11 | public class ResourceServer { 12 | @JsonProperty("audience") 13 | private String audience; 14 | @JsonProperty("scopes") 15 | private List scopes; 16 | 17 | /** 18 | * @return Resource server ID 19 | */ 20 | public String getAudience() { 21 | return audience; 22 | } 23 | 24 | /** 25 | * @return List of scopes for the refresh token 26 | */ 27 | public List getScopes() { 28 | return scopes; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/resourceserver/AuthorizationDetails.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.resourceserver; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | /** 9 | * Class that represents the authorization details associated with a {@link ResourceServer} 10 | */ 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | public class AuthorizationDetails { 14 | 15 | @JsonProperty("type") 16 | private String type; 17 | 18 | /** 19 | * Create a new instance. 20 | * @param type the value of the {@code type} field. 21 | */ 22 | @JsonCreator 23 | public AuthorizationDetails(@JsonProperty("type") String type) { 24 | this.type = type; 25 | } 26 | 27 | /** 28 | * @return the value of the {@code type} field 29 | */ 30 | public String getType() { 31 | return type; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/resourceserver/ResourceServersPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.resourceserver; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Class that represents a given page of Resource Servers. Related to the {@link com.auth0.client.mgmt.ResourceServerEntity} entity. 12 | */ 13 | @SuppressWarnings({"unused", "WeakerAccess"}) 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | @JsonDeserialize(using = ResourceServersPageDeserializer.class) 17 | public class ResourceServersPage extends Page { 18 | 19 | public ResourceServersPage(List items) { 20 | super(items); 21 | } 22 | 23 | public ResourceServersPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/resourceserver/ResourceServersPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.resourceserver; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link ResourceServersPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.ResourceServerEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class ResourceServersPageDeserializer extends PageDeserializer { 17 | 18 | ResourceServersPageDeserializer() { 19 | super(ResourceServer.class, "resource_servers"); 20 | } 21 | 22 | @Override 23 | protected ResourceServersPage createPage(List items) { 24 | return new ResourceServersPage(items); 25 | } 26 | 27 | @Override 28 | protected ResourceServersPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 29 | return new ResourceServersPage(start, length, total, limit, items); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/resourceserver/Scope.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.resourceserver; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | @SuppressWarnings({"WeakerAccess", "unused"}) 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | @JsonInclude(JsonInclude.Include.NON_NULL) 11 | public class Scope { 12 | @JsonProperty("description") 13 | private String description; 14 | @JsonProperty("value") 15 | private String value; 16 | 17 | @JsonCreator 18 | public Scope(@JsonProperty("value") String value) { 19 | this.value = value; 20 | } 21 | 22 | @JsonProperty("description") 23 | public String getDescription() { 24 | return description; 25 | } 26 | 27 | @JsonProperty("description") 28 | public void setDescription(String description) { 29 | this.description = description; 30 | } 31 | 32 | @JsonProperty("value") 33 | public String getValue() { 34 | return value; 35 | } 36 | 37 | @JsonProperty("value") 38 | public void setValue(String value) { 39 | this.value = value; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/roles/RolesPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.roles; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | @SuppressWarnings({"unused", "WeakerAccess"}) 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | @JsonDeserialize(using = RolesPageDeserializer.class) 14 | public class RolesPage extends Page { 15 | 16 | public RolesPage(List items) { 17 | super(items); 18 | } 19 | 20 | public RolesPage(Integer start, Integer length, Integer total, Integer limit, List items) { 21 | super(start, length, total, limit, items); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/roles/RolesPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.roles; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link RolesPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.RolesEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class RolesPageDeserializer extends PageDeserializer { 17 | 18 | RolesPageDeserializer() { 19 | super(Role.class, "roles"); 20 | } 21 | 22 | @Override 23 | protected RolesPage createPage(List items) { 24 | return new RolesPage(items); 25 | } 26 | 27 | @Override 28 | protected RolesPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 29 | return new RolesPage(start, length, total, limit, items); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/rules/RulesPage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.rules; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Class that represents a given page of Rules. Related to the {@link com.auth0.client.mgmt.RulesEntity} entity. 12 | */ 13 | @SuppressWarnings({"unused", "WeakerAccess"}) 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | @JsonDeserialize(using = RulesPageDeserializer.class) 17 | public class RulesPage extends Page { 18 | 19 | public RulesPage(List items) { 20 | super(items); 21 | } 22 | 23 | public RulesPage(Integer start, Integer length, Integer total, Integer limit, List items) { 24 | super(start, length, total, limit, items); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/rules/RulesPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.rules; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link RulesPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.RulesEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class RulesPageDeserializer extends PageDeserializer { 17 | 18 | RulesPageDeserializer() { 19 | super(Rule.class, "rules"); 20 | } 21 | 22 | @Override 23 | protected RulesPage createPage(List items) { 24 | return new RulesPage(items); 25 | } 26 | 27 | @Override 28 | protected RulesPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 29 | return new RulesPage(start, length, total, limit, items); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/selfserviceprofiles/DomainAliasesConfig.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.selfserviceprofiles; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | public class DomainAliasesConfig { 11 | @JsonProperty("domain_verification") 12 | private String domainVerification; 13 | 14 | /** 15 | * Creates a new instance of the DomainAliasesConfig class. 16 | */ 17 | @JsonCreator 18 | public DomainAliasesConfig(@JsonProperty("domain_verification") String domainVerification) { 19 | this.domainVerification = domainVerification; 20 | } 21 | 22 | /** 23 | * Getter for the domain verification. 24 | * @return the domain verification. 25 | */ 26 | public String getDomainVerification() { 27 | return domainVerification; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/selfserviceprofiles/SelfServiceProfileResponsePage.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.selfserviceprofiles; 2 | 3 | import com.auth0.json.mgmt.Page; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 7 | 8 | import java.util.List; 9 | 10 | @JsonIgnoreProperties(ignoreUnknown = true) 11 | @JsonInclude(JsonInclude.Include.NON_NULL) 12 | @JsonDeserialize(using = SelfServiceProfileResponsePageDeserializer.class) 13 | public class SelfServiceProfileResponsePage extends Page { 14 | public SelfServiceProfileResponsePage(List items) { 15 | super(items); 16 | } 17 | 18 | public SelfServiceProfileResponsePage(Integer start, Integer length, Integer total, Integer limit, List items) { 19 | super(start, length, total, limit, items); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/selfserviceprofiles/SelfServiceProfileResponsePageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.selfserviceprofiles; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | 8 | public class SelfServiceProfileResponsePageDeserializer extends PageDeserializer { 9 | 10 | protected SelfServiceProfileResponsePageDeserializer() { 11 | super(SelfServiceProfileResponse.class, "self_service_profiles"); 12 | } 13 | 14 | @Override 15 | protected SelfServiceProfileResponsePage createPage(List items) { 16 | return new SelfServiceProfileResponsePage(items); 17 | } 18 | 19 | @Override 20 | protected SelfServiceProfileResponsePage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 21 | return new SelfServiceProfileResponsePage(start, length, total, limit, items); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/selfserviceprofiles/SsoAccessTicketResponse.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.selfserviceprofiles; 2 | 3 | import com.fasterxml.jackson.annotation.*; 4 | 5 | @JsonInclude(JsonInclude.Include.NON_NULL) 6 | @JsonIgnoreProperties(ignoreUnknown = true) 7 | public class SsoAccessTicketResponse { 8 | @JsonProperty("ticket") 9 | private String ticket; 10 | 11 | /** 12 | * Creates a new instance. 13 | */ 14 | public SsoAccessTicketResponse() { 15 | } 16 | 17 | /** 18 | * Creates a new instance with the given ticket. 19 | * @param ticket the ticket. 20 | */ 21 | @JsonCreator 22 | public SsoAccessTicketResponse(@JsonProperty("ticket") String ticket) { 23 | this.ticket = ticket; 24 | } 25 | 26 | /** 27 | * Getter for the ticket. 28 | * @return the ticket. 29 | */ 30 | public String getTicket() { 31 | return ticket; 32 | } 33 | 34 | /** 35 | * Setter for the ticket. 36 | * @param ticket the ticket to set. 37 | */ 38 | public void setTicket(String ticket) { 39 | this.ticket = ticket; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/sessions/Authentication.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.sessions; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | @JsonInclude(JsonInclude.Include.NON_NULL) 11 | public class Authentication { 12 | @JsonProperty("methods") 13 | private List methods; 14 | 15 | /** 16 | * @return Contains the authentication methods a user has completed during their session 17 | */ 18 | public List getMethods() { 19 | return methods; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/sessions/AuthenticationMethod.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.sessions; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.Date; 8 | 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | @JsonInclude(JsonInclude.Include.NON_NULL) 11 | public class AuthenticationMethod { 12 | @JsonProperty("name") 13 | private String name; 14 | @JsonProperty("timestamp") 15 | private Date timestamp; 16 | @JsonProperty("type") 17 | private String type; 18 | 19 | /** 20 | * @return One of: "federated", "passkey", "pwd", "sms", "email", "mfa", "mock" or a custom method denoted by a URL 21 | */ 22 | public String getName() { 23 | return name; 24 | } 25 | 26 | /** 27 | * @return Timestamp of when the signal was received 28 | */ 29 | public Date getTimestamp() { 30 | return timestamp; 31 | } 32 | 33 | /** 34 | * @return A specific MFA factor. Only present when "name" is set to "mfa" 35 | */ 36 | public String getType() { 37 | return type; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/sessions/Client.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.sessions; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class Client { 10 | @JsonProperty("client_id") 11 | private String clientId; 12 | 13 | /** 14 | * @return ID of client for the session 15 | */ 16 | public String getClientId() { 17 | return clientId; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/tenants/Clients.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.tenants; 2 | 3 | import com.auth0.json.mgmt.tokenquota.ClientCredentials; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | @JsonIgnoreProperties(ignoreUnknown = true) 9 | @JsonInclude(JsonInclude.Include.NON_NULL) 10 | public class Clients { 11 | @JsonProperty("client_credentials") 12 | private ClientCredentials clientCredentials; 13 | 14 | /** 15 | * Default constructor for Clients. 16 | */ 17 | public Clients() { 18 | } 19 | 20 | /** 21 | * Constructor for Clients. 22 | * 23 | * @param clientCredentials the client credentials 24 | */ 25 | public Clients(ClientCredentials clientCredentials) { 26 | this.clientCredentials = clientCredentials; 27 | } 28 | 29 | /** 30 | * @return the client credentials 31 | */ 32 | public ClientCredentials getClientCredentials() { 33 | return clientCredentials; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/tenants/Mtls.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.tenants; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | /** 9 | * Represents the value of the {@code enable_endpoint_aliases} field of the {@link Tenant}. 10 | */ 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | public class Mtls { 14 | 15 | @JsonProperty("enable_endpoint_aliases") 16 | private Boolean enableEndpointAliases; 17 | 18 | /** 19 | * @return the value of the {@code enable_endpoint_aliases} field 20 | */ 21 | public Boolean getEnableEndpointAliases() { 22 | return enableEndpointAliases; 23 | } 24 | 25 | /** 26 | * Sets the value of the {@code enable_endpoint_aliases} field 27 | * 28 | * @param enableEndpointAliases the value of the {@code enable_endpoint_aliases} field 29 | */ 30 | public void setEnableEndpointAliases(Boolean enableEndpointAliases) { 31 | this.enableEndpointAliases = enableEndpointAliases; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/tenants/Organizations.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.tenants; 2 | 3 | import com.auth0.json.mgmt.tokenquota.ClientCredentials; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | @JsonIgnoreProperties(ignoreUnknown = true) 9 | @JsonInclude(JsonInclude.Include.NON_NULL) 10 | public class Organizations { 11 | @JsonProperty("client_credentials") 12 | private ClientCredentials clientCredentials; 13 | 14 | /** 15 | * Default constructor for Organizations. 16 | */ 17 | public Organizations() {} 18 | 19 | /** 20 | * Constructor for Organizations. 21 | * 22 | * @param clientCredentials the client credentials 23 | */ 24 | public Organizations(ClientCredentials clientCredentials) { 25 | this.clientCredentials = clientCredentials; 26 | } 27 | 28 | /** 29 | * @return the client credentials 30 | */ 31 | public ClientCredentials getClientCredentials() { 32 | return clientCredentials; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/tenants/SessionCookie.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.tenants; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | import com.fasterxml.jackson.annotation.JsonProperty; 7 | 8 | /** 9 | * Represents the value of the {@code session_cookie} field of the {@link Tenant}. 10 | */ 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | public class SessionCookie { 14 | 15 | @JsonProperty("mode") 16 | private String mode; 17 | 18 | @JsonCreator 19 | public SessionCookie(@JsonProperty("mode") String mode) { 20 | this.mode = mode; 21 | } 22 | 23 | public String getMode() { 24 | return mode; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/tokenquota/TokenQuota.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.tokenquota; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class TokenQuota { 10 | @JsonProperty("client_credentials") 11 | private ClientCredentials clientCredentials; 12 | 13 | /** 14 | * Default constructor for Clients. 15 | */ 16 | public TokenQuota() {} 17 | /** 18 | * Constructor for Clients. 19 | * 20 | * @param clientCredentials the client credentials 21 | */ 22 | public TokenQuota(ClientCredentials clientCredentials) { 23 | this.clientCredentials = clientCredentials; 24 | } 25 | 26 | /** 27 | * @return the client credentials 28 | */ 29 | public ClientCredentials getClientCredentials() { 30 | return clientCredentials; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/userblocks/BlockDetails.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.userblocks; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @SuppressWarnings({"unused", "WeakerAccess"}) 8 | @JsonIgnoreProperties(ignoreUnknown = true) 9 | @JsonInclude(JsonInclude.Include.NON_NULL) 10 | public class BlockDetails { 11 | 12 | @JsonProperty("identifier") 13 | private String identifier; 14 | @JsonProperty("ip") 15 | private String ip; 16 | 17 | @JsonProperty("identifier") 18 | public String getIdentifier() { 19 | return identifier; 20 | } 21 | 22 | @JsonProperty("ip") 23 | public String getIP() { 24 | return ip; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/userblocks/UserBlocks.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.userblocks; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Class that represents an Auth0 User Block object. Related to the {@link com.auth0.client.mgmt.UserBlocksEntity} entity. 11 | */ 12 | @SuppressWarnings({"unused", "WeakerAccess"}) 13 | @JsonIgnoreProperties(ignoreUnknown = true) 14 | @JsonInclude(JsonInclude.Include.NON_NULL) 15 | public class UserBlocks { 16 | 17 | @JsonProperty("blocked_for") 18 | private List blockedFor; 19 | 20 | /** 21 | * Getter for the list of user block details. 22 | * 23 | * @return the list of block details. 24 | */ 25 | @JsonProperty("blocked_for") 26 | public List getBlockedFor() { 27 | return blockedFor; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/users/RecoveryCode.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.users; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @SuppressWarnings("unused") 8 | @JsonIgnoreProperties(ignoreUnknown = true) 9 | @JsonInclude(JsonInclude.Include.NON_NULL) 10 | public class RecoveryCode { 11 | 12 | @JsonProperty("recovery_code") 13 | private String code; 14 | 15 | @JsonProperty("recovery_code") 16 | public String getCode() { 17 | return code; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/users/UsersPageDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.users; 2 | 3 | import com.auth0.json.mgmt.PageDeserializer; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Parses a given paged response into their {@link UsersPage} representation. 9 | *

10 | * This class is thread-safe. 11 | * 12 | * @see PageDeserializer 13 | * @see com.auth0.client.mgmt.UsersEntity 14 | */ 15 | @SuppressWarnings({"unused", "WeakerAccess"}) 16 | class UsersPageDeserializer extends PageDeserializer { 17 | 18 | UsersPageDeserializer() { 19 | super(User.class, "users"); 20 | } 21 | 22 | @Override 23 | protected UsersPage createPage(List items) { 24 | return new UsersPage(items); 25 | } 26 | 27 | @Override 28 | @SuppressWarnings("deprecation") 29 | protected UsersPage createPage(Integer start, Integer length, Integer total, Integer limit, List items) { 30 | return new UsersPage(start, length, total, limit, items); 31 | } 32 | 33 | @Override 34 | protected UsersPage createPage(Integer start, Integer length, Integer total, Integer limit, String next, List items) { 35 | return new UsersPage(start, length, total, limit, next, items); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/json/mgmt/users/authenticationmethods/AuthMethod.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.users.authenticationmethods; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import com.fasterxml.jackson.annotation.JsonProperty; 6 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) 8 | @JsonInclude(JsonInclude.Include.NON_NULL) 9 | public class AuthMethod { 10 | 11 | @JsonProperty("id") 12 | private String id; 13 | @JsonProperty("type") 14 | private String type; 15 | 16 | public String getId() { 17 | return id; 18 | } 19 | 20 | public String getType() { 21 | return type; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/Response.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * Represents the response of an HTTP request executed by {@link Request}. 7 | * 8 | * @param the type of the parsed response body. 9 | */ 10 | public interface Response { 11 | 12 | /** 13 | * @return the HTTP response headers. 14 | */ 15 | Map getHeaders(); 16 | 17 | /** 18 | * @return the response body. 19 | */ 20 | T getBody(); 21 | 22 | /** 23 | * @return the HTTP status code. 24 | */ 25 | int getStatusCode(); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/ResponseImpl.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net; 2 | 3 | import java.util.Collections; 4 | import java.util.Map; 5 | 6 | class ResponseImpl implements Response { 7 | 8 | private final Map headers; 9 | private final T body; 10 | private final int statusCode; 11 | 12 | ResponseImpl(Map headers, T body, int statusCode) { 13 | this.headers = Collections.unmodifiableMap(headers); 14 | this.body = body; 15 | this.statusCode = statusCode; 16 | } 17 | 18 | @Override 19 | public Map getHeaders() { 20 | return headers; 21 | } 22 | 23 | @Override 24 | public T getBody() { 25 | return body; 26 | } 27 | 28 | @Override 29 | public int getStatusCode() { 30 | return statusCode; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/SignUpRequest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net; 2 | 3 | import com.auth0.json.auth.CreatedUser; 4 | import com.auth0.net.client.Auth0HttpClient; 5 | import com.auth0.net.client.HttpMethod; 6 | import com.fasterxml.jackson.core.type.TypeReference; 7 | 8 | import java.util.Map; 9 | 10 | /** 11 | * Class that represents a Create User call. 12 | */ 13 | public class SignUpRequest extends BaseRequest { 14 | 15 | public SignUpRequest(Auth0HttpClient client, String url) { 16 | super(client, null, url, HttpMethod.POST, new TypeReference() { 17 | }); 18 | } 19 | 20 | /** 21 | * Setter for the additional fields to set when creating a user. 22 | * 23 | * @param customFields the list of custom fields. 24 | * @return this request instance. 25 | */ 26 | public SignUpRequest setCustomFields(Map customFields) { 27 | super.addParameter("user_metadata", customFields); 28 | return this; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/TokenQuotaBucket.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | 6 | @JsonIgnoreProperties(ignoreUnknown = true) 7 | @JsonInclude(JsonInclude.Include.NON_NULL) 8 | public class TokenQuotaBucket { 9 | private TokenQuotaLimit perHour; 10 | private TokenQuotaLimit perDay; 11 | 12 | /** 13 | * Constructor for TokenQuotaBucket. 14 | */ 15 | public TokenQuotaBucket(TokenQuotaLimit perHour, TokenQuotaLimit perDay) { 16 | this.perHour = perHour; 17 | this.perDay = perDay; 18 | } 19 | 20 | /** 21 | * @return the number of client credentials allowed per hour 22 | */ 23 | public TokenQuotaLimit getPerHour() { 24 | return perHour; 25 | } 26 | 27 | /** 28 | * @return the number of client credentials allowed per hour 29 | */ 30 | public TokenQuotaLimit getPerDay() { 31 | return perDay; 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/TokenQuotaLimit.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | 6 | @JsonIgnoreProperties(ignoreUnknown = true) 7 | @JsonInclude(JsonInclude.Include.NON_NULL) 8 | public class TokenQuotaLimit { 9 | private int quota; 10 | private int remaining; 11 | private int resetAfter; 12 | 13 | public TokenQuotaLimit(int quota, int remaining, int resetAfter) { 14 | this.quota = quota; 15 | this.remaining = remaining; 16 | this.resetAfter = resetAfter; 17 | } 18 | 19 | public int getQuota() { 20 | return quota; 21 | } 22 | 23 | public int getRemaining() { 24 | return remaining; 25 | } 26 | 27 | public int getResetAfter() { 28 | return resetAfter; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/VoidRequest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net; 2 | 3 | import com.auth0.client.mgmt.TokenProvider; 4 | import com.auth0.exception.Auth0Exception; 5 | import com.auth0.net.client.Auth0HttpClient; 6 | import com.auth0.net.client.Auth0HttpResponse; 7 | import com.auth0.net.client.HttpMethod; 8 | import com.fasterxml.jackson.core.type.TypeReference; 9 | 10 | import java.util.HashMap; 11 | 12 | /** 13 | * Represents a request that doesn't return any value on its success. 14 | *

15 | * This class is not thread-safe: 16 | * It makes use of {@link HashMap} for storing the parameters. Make sure to not modify headers or the parameters 17 | * from a different or un-synchronized thread. 18 | * 19 | * @see BaseRequest 20 | */ 21 | public class VoidRequest extends BaseRequest { 22 | 23 | public VoidRequest(Auth0HttpClient client, TokenProvider tokenProvider, String url, HttpMethod method) { 24 | super(client, tokenProvider, url, method, new TypeReference() { 25 | }); 26 | } 27 | 28 | @Override 29 | protected Void parseResponseBody(Auth0HttpResponse response) throws Auth0Exception { 30 | if (!response.isSuccessful()) { 31 | throw super.createResponseException(response); 32 | } 33 | return null; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/client/Auth0FormRequestBody.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net.client; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * Represents the body of a application/x-www-form-urlencoded request 7 | */ 8 | public class Auth0FormRequestBody { 9 | 10 | private final Map params; 11 | 12 | public Auth0FormRequestBody(Map params) { 13 | this.params = params; 14 | } 15 | 16 | public Map getParams() { 17 | return params; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/client/Auth0HttpClient.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net.client; 2 | 3 | import java.io.IOException; 4 | import java.util.concurrent.CompletableFuture; 5 | 6 | /** 7 | * The HttpClient interface defines how HTTP requests to the Auth0 APIs are made. 8 | */ 9 | public interface Auth0HttpClient { 10 | 11 | /** 12 | * Builds, executes, and returns the result of a synchronous HTTP request to an Auth0 API. 13 | * @param request the request to send. 14 | * @return the response returned by the executed request. 15 | * @throws IOException if the request can not be completed due to a network timeout or interruption. 16 | */ 17 | Auth0HttpResponse sendRequest(Auth0HttpRequest request) throws IOException; 18 | 19 | /** 20 | * Builds and executes an asynchronous HTTP request to an Auth0 API. 21 | * @param request the request to send. 22 | * @return the {@link CompletableFuture} that represents the result of the asynchronous HTTP request. 23 | */ 24 | CompletableFuture sendRequestAsync(Auth0HttpRequest request); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/client/HttpMethod.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net.client; 2 | 3 | /** 4 | * Represents the HTTP methods when calling the Auth0 APIs. 5 | */ 6 | public enum HttpMethod { 7 | 8 | GET, POST, PUT, PATCH, DELETE; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/net/client/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines the HTTP client networking layer to make, execute, and parse HTTP 3 | * responses to the Auth0 APIs. 4 | */ 5 | package com.auth0.net.client; 6 | -------------------------------------------------------------------------------- /src/main/java/com/auth0/utils/tokens/HS256SignatureVerifier.java: -------------------------------------------------------------------------------- 1 | package com.auth0.utils.tokens; 2 | 3 | import com.auth0.jwt.algorithms.Algorithm; 4 | 5 | /** 6 | * An implementation of {@code SignatureVerifier} for tokens signed with the HS256 symmetric signing algorithm. 7 | *

8 | * This class is thread-safe. 9 | */ 10 | class HS256SignatureVerifier extends SignatureVerifier { 11 | 12 | HS256SignatureVerifier(String secret) { 13 | super(Algorithm.HMAC256(secret)); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/AssertsUtil.java: -------------------------------------------------------------------------------- 1 | package com.auth0; 2 | 3 | import org.junit.jupiter.api.function.Executable; 4 | 5 | import static org.hamcrest.MatcherAssert.assertThat; 6 | import static org.hamcrest.Matchers.is; 7 | import static org.junit.jupiter.api.Assertions.assertThrows; 8 | 9 | public class AssertsUtil { 10 | 11 | public static T verifyThrows(Class expectedType, Executable executable) { 12 | return assertThrows(expectedType, executable); 13 | } 14 | 15 | public static T verifyThrows(Class expectedType, Executable executable, String message) { 16 | T result = assertThrows(expectedType, executable); 17 | assertThat(result.getMessage(), is(message)); 18 | return result; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/client/mgmt/BaseMgmtEntityTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.mgmt; 2 | 3 | import com.auth0.client.MockServer; 4 | import org.junit.jupiter.api.AfterEach; 5 | import org.junit.jupiter.api.BeforeEach; 6 | 7 | public class BaseMgmtEntityTest { 8 | 9 | private static final String API_TOKEN = "apiToken"; 10 | 11 | protected MockServer server; 12 | protected ManagementAPI api; 13 | 14 | @BeforeEach 15 | public void setUp() throws Exception { 16 | server = new MockServer(); 17 | api = ManagementAPI.newBuilder(server.getBaseUrl(), API_TOKEN).build(); 18 | } 19 | 20 | @AfterEach 21 | public void tearDown() throws Exception { 22 | server.stop(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/client/mgmt/SimpleTokenProviderTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.client.mgmt; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import java.util.concurrent.CompletableFuture; 6 | 7 | import static com.auth0.AssertsUtil.verifyThrows; 8 | import static org.hamcrest.MatcherAssert.assertThat; 9 | import static org.hamcrest.Matchers.is; 10 | 11 | public class SimpleTokenProviderTest { 12 | 13 | @Test 14 | public void throwsWhenTokenNull() { 15 | verifyThrows(IllegalArgumentException.class, 16 | () -> SimpleTokenProvider.create(null), 17 | "'api token' cannot be null!"); 18 | } 19 | 20 | @Test 21 | public void getTokenReturnsToken() throws Exception { 22 | TokenProvider provider = SimpleTokenProvider.create("token"); 23 | assertThat(provider.getToken(), is("token")); 24 | } 25 | 26 | @Test 27 | public void getTokenAsyncReturnsTokenFuture() throws Exception { 28 | TokenProvider provider = SimpleTokenProvider.create("token"); 29 | CompletableFuture future = provider.getTokenAsync(); 30 | assertThat(future.get(), is("token")); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/ObjectMapperProviderTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.hamcrest.MatcherAssert.assertThat; 7 | import static org.hamcrest.Matchers.equalTo; 8 | 9 | public class ObjectMapperProviderTest { 10 | 11 | @Test 12 | public void providesSameInstance() { 13 | ObjectMapper mapper = ObjectMapperProvider.getMapper(); 14 | assertThat(mapper, equalTo(ObjectMapperProvider.getMapper())); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/auth/PasswordlessEmailResponseTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.auth; 2 | 3 | import com.auth0.json.JsonTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.hamcrest.MatcherAssert.assertThat; 7 | import static org.hamcrest.Matchers.is; 8 | import static org.hamcrest.Matchers.notNullValue; 9 | 10 | public class PasswordlessEmailResponseTest extends JsonTest { 11 | 12 | private final static String EMAIL_RESPONSE_JSON = "{\"_id\":\"abc123\",\"email\":\"user@domain.com\",\"email_verified\":true}"; 13 | 14 | @Test 15 | public void shouldDeserializePasswordlessEmailResponse() throws Exception { 16 | PasswordlessEmailResponse response = fromJSON(EMAIL_RESPONSE_JSON, PasswordlessEmailResponse.class); 17 | 18 | assertThat(response, is(notNullValue())); 19 | 20 | assertThat(response.getEmail(), is("user@domain.com")); 21 | assertThat(response.getId(), is("abc123")); 22 | assertThat(response.isEmailVerified(), is(true)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/auth/PasswordlessSmsResponseTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.auth; 2 | 3 | import com.auth0.json.JsonTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.hamcrest.MatcherAssert.assertThat; 7 | import static org.hamcrest.Matchers.*; 8 | 9 | public class PasswordlessSmsResponseTest extends JsonTest { 10 | 11 | private final static String SMS_RESPONSE_JSON = "{\"_id\":\"abc123\",\"phone_number\":\"+11234567891\",\"phone_verified\":false,\"request_language\":null}"; 12 | 13 | @Test 14 | public void shouldDeserializePasswordlessEmailResponse() throws Exception { 15 | PasswordlessSmsResponse response = fromJSON(SMS_RESPONSE_JSON, PasswordlessSmsResponse.class); 16 | 17 | assertThat(response, is(notNullValue())); 18 | 19 | assertThat(response.getId(), is("abc123")); 20 | assertThat(response.isPhoneVerified(), is(false)); 21 | assertThat(response.getPhoneNumber(), is("+11234567891")); 22 | assertThat(response.getRequestLanguage(), is(nullValue())); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/DailyStatsTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt; 2 | 3 | import com.auth0.json.JsonTest; 4 | import com.auth0.json.mgmt.stats.DailyStats; 5 | import org.junit.jupiter.api.Test; 6 | 7 | import static org.hamcrest.MatcherAssert.assertThat; 8 | import static org.hamcrest.Matchers.*; 9 | 10 | public class DailyStatsTest extends JsonTest { 11 | private static final String json = "{\"logins\":123,\"date\":\"2017-01-18T17:45:08.328Z\"}"; 12 | 13 | @Test 14 | public void shouldDeserialize() throws Exception { 15 | DailyStats stats = fromJSON(json, DailyStats.class); 16 | 17 | assertThat(stats, is(notNullValue())); 18 | assertThat(stats.getDate(), is(equalTo(parseJSONDate("2017-01-18T17:45:08.328Z")))); 19 | assertThat(stats.getLogins(), is(123)); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/ScopeTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt; 2 | 3 | import com.auth0.json.JsonMatcher; 4 | import com.auth0.json.JsonTest; 5 | import com.auth0.json.mgmt.resourceserver.Scope; 6 | import org.junit.jupiter.api.Test; 7 | 8 | import static org.hamcrest.MatcherAssert.assertThat; 9 | import static org.hamcrest.Matchers.is; 10 | 11 | public class ScopeTest extends JsonTest { 12 | private static final String SCOPE_JSON = "src/test/resources/mgmt/scope.json"; 13 | 14 | @Test 15 | public void serialize() throws Exception { 16 | Scope scope = new Scope("read:client_grants"); 17 | scope.setDescription("Read Client Grants"); 18 | String json = toJSON(scope); 19 | 20 | assertThat(json, JsonMatcher.hasEntry("value", "read:client_grants")); 21 | assertThat(json, JsonMatcher.hasEntry("description", "Read Client Grants")); 22 | } 23 | 24 | @Test 25 | public void deserialize() throws Exception { 26 | Scope deserialized = fromJSON(readTextFile(SCOPE_JSON), Scope.class); 27 | 28 | assertThat(deserialized.getValue(), is("read:client_grants")); 29 | assertThat(deserialized.getDescription(), is("Read Client Grants")); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/TokenTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt; 2 | 3 | import com.auth0.json.JsonMatcher; 4 | import com.auth0.json.JsonTest; 5 | import com.auth0.json.mgmt.blacklists.Token; 6 | import org.junit.jupiter.api.Test; 7 | 8 | import static org.hamcrest.MatcherAssert.assertThat; 9 | import static org.hamcrest.Matchers.is; 10 | import static org.hamcrest.Matchers.notNullValue; 11 | 12 | public class TokenTest extends JsonTest { 13 | private static final String json = "{\"jti\":\"id\",\"aud\":\"myapi\"}"; 14 | 15 | @Test 16 | public void shouldSerialize() throws Exception { 17 | Token token = new Token("id"); 18 | token.setAud("myapi"); 19 | 20 | String serialized = toJSON(token); 21 | assertThat(serialized, is(notNullValue())); 22 | assertThat(serialized, JsonMatcher.hasEntry("jti", "id")); 23 | assertThat(serialized, JsonMatcher.hasEntry("aud", "myapi")); 24 | } 25 | 26 | @Test 27 | public void shouldDeserialize() throws Exception { 28 | Token token = fromJSON(json, Token.class); 29 | 30 | assertThat(token, is(notNullValue())); 31 | assertThat(token.getAud(), is("myapi")); 32 | assertThat(token.getJTI(), is("id")); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/client/IOSTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.client; 2 | 3 | import com.auth0.json.JsonMatcher; 4 | import com.auth0.json.JsonTest; 5 | import org.junit.jupiter.api.Test; 6 | 7 | import static org.hamcrest.MatcherAssert.assertThat; 8 | import static org.hamcrest.Matchers.is; 9 | import static org.hamcrest.Matchers.notNullValue; 10 | 11 | public class IOSTest extends JsonTest { 12 | 13 | private static final String json = "{\"team_id\":\"team\",\"app_bundle_identifier\":\"identifier\"}"; 14 | 15 | @Test 16 | public void shouldSerialize() throws Exception { 17 | IOS ios = new IOS("team", "identifier"); 18 | 19 | String serialized = toJSON(ios); 20 | assertThat(serialized, is(notNullValue())); 21 | assertThat(serialized, JsonMatcher.hasEntry("team_id", "team")); 22 | assertThat(serialized, JsonMatcher.hasEntry("app_bundle_identifier", "identifier")); 23 | } 24 | 25 | @Test 26 | public void shouldDeserialize() throws Exception { 27 | IOS ios = fromJSON(json, IOS.class); 28 | 29 | assertThat(ios, is(notNullValue())); 30 | 31 | assertThat(ios.getTeamId(), is("team")); 32 | assertThat(ios.getAppBundleIdentifier(), is("identifier")); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/connections/EnabledClientRequestTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.connections; 2 | 3 | import com.auth0.json.JsonMatcher; 4 | import com.auth0.json.JsonTest; 5 | import org.junit.jupiter.api.Test; 6 | 7 | import static org.hamcrest.MatcherAssert.assertThat; 8 | import static org.hamcrest.Matchers.*; 9 | 10 | public class EnabledClientRequestTest extends JsonTest { 11 | private static final String json = "{\"client_id\":\"1\",\"status\":true}"; 12 | 13 | @Test 14 | public void shouldSerialize() throws Exception { 15 | EnabledClientRequest enabledClientRequest = new EnabledClientRequest("1", true); 16 | 17 | String serialized = toJSON(enabledClientRequest); 18 | assertThat(serialized, is(notNullValue())); 19 | assertThat(serialized, JsonMatcher.hasEntry("client_id", "1")); 20 | assertThat(serialized, JsonMatcher.hasEntry("status", true)); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/guardian/FactorTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.guardian; 2 | 3 | import com.auth0.json.JsonMatcher; 4 | import com.auth0.json.JsonTest; 5 | import org.junit.jupiter.api.Test; 6 | 7 | import static org.hamcrest.MatcherAssert.assertThat; 8 | import static org.hamcrest.Matchers.is; 9 | import static org.hamcrest.Matchers.notNullValue; 10 | 11 | public class FactorTest extends JsonTest { 12 | 13 | private static final String readOnlyJson = "{\"enabled\":true,\"name\":\"sms\",\"trial_expired\":true}"; 14 | 15 | @Test 16 | public void shouldSerialize() throws Exception { 17 | Factor factor = new Factor(true); 18 | 19 | String serialized = toJSON(factor); 20 | assertThat(serialized, is(notNullValue())); 21 | assertThat(serialized, JsonMatcher.hasEntry("enabled", true)); 22 | } 23 | 24 | @Test 25 | public void shouldDeserialize() throws Exception { 26 | Factor factor = fromJSON(readOnlyJson, Factor.class); 27 | 28 | assertThat(factor, is(notNullValue())); 29 | assertThat(factor.isEnabled(), is(true)); 30 | assertThat(factor.getName(), is("sms")); 31 | assertThat(factor.isTrialExpired(), is(true)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/permissions/PermissionSourceTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.permissions; 2 | 3 | import com.auth0.json.JsonTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.hamcrest.MatcherAssert.assertThat; 7 | import static org.hamcrest.Matchers.is; 8 | import static org.hamcrest.Matchers.notNullValue; 9 | 10 | public class PermissionSourceTest extends JsonTest { 11 | 12 | private static final String json = "{\"source_name\":\"sName\",\"source_id\":\"sId\",\"source_type\":\"sType\"}"; 13 | 14 | @Test 15 | public void shouldDeserialize() throws Exception { 16 | PermissionSource permission = fromJSON(json, PermissionSource.class); 17 | 18 | assertThat(permission, is(notNullValue())); 19 | assertThat(permission.getName(), is("sName")); 20 | assertThat(permission.getId(), is("sId")); 21 | assertThat(permission.getType(), is("sType")); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/userblocks/BlockDetailsTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.userblocks; 2 | 3 | import com.auth0.json.JsonTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.hamcrest.MatcherAssert.assertThat; 7 | import static org.hamcrest.Matchers.is; 8 | import static org.hamcrest.Matchers.notNullValue; 9 | 10 | public class BlockDetailsTest extends JsonTest { 11 | 12 | private static final String json = "{\"ip\":\"10.0.0.1\", \"identifier\":\"username\"}"; 13 | 14 | @Test 15 | public void shouldDeserialize() throws Exception { 16 | BlockDetails details = fromJSON(json, BlockDetails.class); 17 | 18 | assertThat(details, is(notNullValue())); 19 | assertThat(details.getIdentifier(), is("username")); 20 | assertThat(details.getIP(), is("10.0.0.1")); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/userblocks/UserBlocksTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.userblocks; 2 | 3 | import com.auth0.json.JsonTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.hamcrest.MatcherAssert.assertThat; 7 | import static org.hamcrest.Matchers.*; 8 | 9 | public class UserBlocksTest extends JsonTest { 10 | 11 | private static final String json = "{\"blocked_for\":[{},{}]}"; 12 | 13 | @Test 14 | public void shouldDeserialize() throws Exception { 15 | UserBlocks blocks = fromJSON(json, UserBlocks.class); 16 | 17 | assertThat(blocks, is(notNullValue())); 18 | assertThat(blocks.getBlockedFor(), is(notNullValue())); 19 | assertThat(blocks.getBlockedFor(), hasSize(2)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/json/mgmt/users/RecoveryCodeTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.json.mgmt.users; 2 | 3 | import com.auth0.json.JsonTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.hamcrest.MatcherAssert.assertThat; 7 | import static org.hamcrest.Matchers.is; 8 | import static org.hamcrest.Matchers.notNullValue; 9 | 10 | public class RecoveryCodeTest extends JsonTest { 11 | 12 | private static final String json = "{\"recovery_code\":\"supersecretCODE\"}"; 13 | 14 | @Test 15 | public void shouldDeserialize() throws Exception { 16 | RecoveryCode code = fromJSON(json, RecoveryCode.class); 17 | 18 | assertThat(code, is(notNullValue())); 19 | assertThat(code.getCode(), is("supersecretCODE")); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/net/client/Auth0HttpRequestTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net.client; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | import static org.hamcrest.MatcherAssert.assertThat; 9 | import static org.hamcrest.Matchers.is; 10 | 11 | public class Auth0HttpRequestTest { 12 | 13 | @Test 14 | public void headersAreDefensive() { 15 | Map headers = new HashMap<>(); 16 | headers.put("name", "value"); 17 | 18 | Auth0HttpRequest request = Auth0HttpRequest.newBuilder("url", HttpMethod.POST) 19 | .withHeaders(headers) 20 | .build(); 21 | 22 | headers.put("name", "UPDATED"); 23 | 24 | assertThat(request.getHeaders().get("name"), is("value")); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/net/client/Auth0HttpResponseTest.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net.client; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | import static org.hamcrest.MatcherAssert.assertThat; 9 | import static org.hamcrest.Matchers.is; 10 | 11 | public class Auth0HttpResponseTest { 12 | 13 | @Test 14 | public void headersAreDefensive() { 15 | Map headers = new HashMap<>(); 16 | headers.put("name", "value"); 17 | 18 | Auth0HttpResponse response = Auth0HttpResponse.newBuilder() 19 | .withHeaders(headers) 20 | .build(); 21 | 22 | headers.put("name", "UPDATED"); 23 | 24 | assertThat(response.getHeaders().get("name"), is("value")); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/net/client/multipart/FilePart.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net.client.multipart; 2 | 3 | public class FilePart extends KeyValuePart { 4 | 5 | private final String filename; 6 | private final String contentType; 7 | 8 | public FilePart(String key, String value, String filename, String contentType) { 9 | super(key, value); 10 | this.filename = filename; 11 | this.contentType = contentType; 12 | } 13 | 14 | public String getFilename() { 15 | return filename; 16 | } 17 | 18 | public String getContentType() { 19 | return contentType; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/com/auth0/net/client/multipart/KeyValuePart.java: -------------------------------------------------------------------------------- 1 | package com.auth0.net.client.multipart; 2 | 3 | public class KeyValuePart { 4 | 5 | private final String key; 6 | private final String value; 7 | 8 | public KeyValuePart(String key, String value) { 9 | this.key = key; 10 | this.value = value; 11 | } 12 | 13 | public String getKey() { 14 | return key; 15 | } 16 | 17 | public String getValue() { 18 | return value; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/auth/add_oob_authenticator_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "oob_code": "Fe26.2**da6....", 3 | "binding_method":"prompt", 4 | "authenticator_type":"oob", 5 | "oob_channel":"sms", 6 | "recovery_codes":["ABCDEFGDRFK75ABYR7PH8TJA"], 7 | "barcode_uri":"otpauth://..." 8 | } 9 | -------------------------------------------------------------------------------- /src/test/resources/auth/add_otp_authenticator_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "secret": "ABCDEFGMK5CE6WTZKRTTQRKUJVFXOVRF", 3 | "barcode_uri":"otpauth://...", 4 | "authenticator_type":"otp", 5 | "recovery_codes":["ABCDEFGDRFK75ABYR7PH8TJA"] 6 | } 7 | -------------------------------------------------------------------------------- /src/test/resources/auth/back_channel_authorize_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "auth_req_id": "red_id_1", 3 | "expires_in": 300, 4 | "interval": 5 5 | } 6 | -------------------------------------------------------------------------------- /src/test/resources/auth/back_channel_login_status_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "access_token": "eyJhbGciOiJkaXIi.....", 3 | "id_token": "eyJhbGciOiJSUzI1NiIs.....", 4 | "expires_in": 86400, 5 | "scope": "openid" 6 | } 7 | -------------------------------------------------------------------------------- /src/test/resources/auth/error_plaintext.json: -------------------------------------------------------------------------------- 1 | A plain-text error response -------------------------------------------------------------------------------- /src/test/resources/auth/error_with_description.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BadRequestError", 3 | "code": "user_exists", 4 | "description": "The user already exists.", 5 | "statusCode": 400 6 | } -------------------------------------------------------------------------------- /src/test/resources/auth/error_with_description_and_extra_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "mfa_required", 3 | "error_description": "Multifactor authentication required", 4 | "mfa_token": "Fe26...Ha" 5 | } -------------------------------------------------------------------------------- /src/test/resources/auth/error_with_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "missing username for Username-Password-Authentication connection with requires_username enabled" 3 | } -------------------------------------------------------------------------------- /src/test/resources/auth/error_with_error_description.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "invalid_request", 3 | "error_description": "the connection was not found" 4 | } -------------------------------------------------------------------------------- /src/test/resources/auth/list_authenticators_response.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id":"recovery-code|dev_DsvzGfZw2Fg5N3rI", 4 | "authenticator_type":"recovery-code", 5 | "active":true 6 | }, 7 | { 8 | "id":"sms|dev_gB342kcL2K22S4yB", 9 | "authenticator_type":"oob", 10 | "oob_channel":"sms", 11 | "name":"+X XXXX1234", 12 | "active":true 13 | }, 14 | { 15 | "id":"sms|dev_gB342kcL2K22S4yB", 16 | "authenticator_type":"oob", 17 | "oob_channel":"sms", 18 | "name":"+X XXXX1234", 19 | "active":false 20 | }, 21 | { 22 | "id":"totp|dev_LJaKaN5O3tjRFOw2", 23 | "authenticator_type":"otp", 24 | "active":true 25 | } 26 | ] 27 | -------------------------------------------------------------------------------- /src/test/resources/auth/mfa_challenge_request_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "challenge_type":"oob", 3 | "binding_method":"prompt", 4 | "oob_code": "abcde...dasg" 5 | } 6 | -------------------------------------------------------------------------------- /src/test/resources/auth/passwordless_email.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "5f85do7a2c673038a807254c", 3 | "email": "user@domain.com", 4 | "email_verified": false 5 | } -------------------------------------------------------------------------------- /src/test/resources/auth/passwordless_sms.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "5f85d99a2c673038a8111f5f", 3 | "phone_number": "+16511234567", 4 | "phone_verified": false, 5 | "request_language": null 6 | } 7 | -------------------------------------------------------------------------------- /src/test/resources/auth/pushed_authorization_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "request_uri": "urn:example:bwc4JK-ESC0w8acc191e-Y1LTC2", 3 | "expires_in": 90 4 | } 5 | -------------------------------------------------------------------------------- /src/test/resources/auth/reset_password.json: -------------------------------------------------------------------------------- 1 | We've just sent you an email to reset your password. -------------------------------------------------------------------------------- /src/test/resources/auth/rsa_public_key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuGbXWiK3dQTyCbX5xdE4 3 | yCuYp0AF2d15Qq1JSXT/lx8CEcXb9RbDddl8jGDv+spi5qPa8qEHiK7FwV2KpRE9 4 | 83wGPnYsAm9BxLFb4YrLYcDFOIGULuk2FtrPS512Qea1bXASuvYXEpQNpGbnTGVs 5 | WXI9C+yjHztqyL2h8P6mlThPY9E9ue2fCqdgixfTFIF9Dm4SLHbphUS2iw7w1JgT 6 | 69s7of9+I9l5lsJ9cozf1rxrXX4V1u/SotUuNB3Fp8oB4C1fLBEhSlMcUJirz1E8 7 | AziMCxS+VrRPDM+zfvpIJg3JljAh3PJHDiLu902v9w+Iplu1WyoB2aPfitxEhRN0 8 | YwIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /src/test/resources/auth/sign_up.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "58457fe6b27", 3 | "email_verified": false, 4 | "email": "me@auth0.com" 5 | } -------------------------------------------------------------------------------- /src/test/resources/auth/sign_up_username.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "58457fe6b27", 3 | "email_verified": false, 4 | "email": "me@auth0.com", 5 | "username": "me", 6 | "phone_number": "1234567890" 7 | } 8 | -------------------------------------------------------------------------------- /src/test/resources/auth/tokens.json: -------------------------------------------------------------------------------- 1 | { 2 | "id_token": "eyJ0eXAiOiJKV1Qi...", 3 | "access_token": "A9CvPwFojaBI...", 4 | "refresh_token": "GEbRxBN...edjnXbL", 5 | "token_type": "bearer", 6 | "expires_in": 86000 7 | } -------------------------------------------------------------------------------- /src/test/resources/auth/user_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "email_verified": false, 3 | "email": "test.account@userinfo.com", 4 | "clientID": "q2hnj2iu...", 5 | "updated_at": "2016-12-05T15:15:40.545Z", 6 | "name": "test.account@userinfo.com", 7 | "picture": "https://s.gravatar.com/avatar/dummy.png", 8 | "user_id": "auth0|58454...", 9 | "nickname": "test.account", 10 | "identities": [ 11 | { 12 | "user_id": "58454...", 13 | "provider": "auth0", 14 | "connection": "Username-Password-Authentication", 15 | "isSocial": false 16 | } 17 | ], 18 | "created_at": "2016-12-05T11:16:59.640Z", 19 | "sub": "auth0|58454..." 20 | } -------------------------------------------------------------------------------- /src/test/resources/keys/bad-public-rsa.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzELuTuakDmN69DZoZfEO 3 | tYLLHnwcAJGlk9qKU3F+VWyadLuOVZ9cApJpZkpi+zPFOTnmVK9NyVgN9mA4lyDj 4 | G4SDB8NdzMuIidsoSWUqiu05z8bqAFO9SH284hDJ+eVuT6a0nru6mFczr64AZXNz 5 | YyL1nyjih0bujcZPKLvNp0g7NvCmxgpGOth9IF5goMsLFgA3SuCLpMzRB4+czIqR 6 | E6XRyfojo0xX1dNzYxohM7ai1WD3Maq3GwcKV+r1H3Jp8p0yGya5hc1XPDhkidD5 7 | 46mVrdja13IwhVoy0QloeKhEd6cV1Gbd9BWbU4Q13BXb8JJ+AQjXr0cgn0l3wYvb 8 | hQIDAQAc 9 | -----END PUBLIC KEY----- -------------------------------------------------------------------------------- /src/test/resources/keys/public-rsa.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzELuTuakDmN69DZoZfEO 3 | tYLLHnwcAJGlk9qKU3F+VWyadLuOVZ9cApJpZkpi+zPFOTnmVK9NyVgN9mA4lyDj 4 | G4SDB8NdzMuIidsoSWUqiu05z8bqAFO9SH284hDJ+eVuT6a0nru6mFczr64AZXNz 5 | YyL1nyjih0bujcZPKLvNp0g7NvCmxgpGOth9IF5goMsLFgA3SuCLpMzRB4+czIqR 6 | E6XRyfojo0xX1dNzYxohM7ai1WD3Maq3GwcKV+r1H3Jp8p0yGya5hc1XPDhkidD5 7 | 46mVrdja13IwhVoy0QloeKhEd6cV1Gbd9BWbU4Q13BXb8JJ+AQjXr0cgn0l3wYvb 8 | hQIDAQAB 9 | -----END PUBLIC KEY----- -------------------------------------------------------------------------------- /src/test/resources/mgmt/action_execution.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "SBMzFjrcQ-uZMaaTkQ_EsTIwMjEwODE2", 3 | "trigger_id": "post-login", 4 | "status": "partial", 5 | "results": [ 6 | { 7 | "binding_id": "18490d5b-7d34-42c5-a21d-37cb77c666a5", 8 | "version_id": "fbc0chac-2863-4c47-8445-11c2881fd1e9", 9 | "action_name": "first action - Updated - Updated", 10 | "response": { 11 | "error": { 12 | "message": "oops", 13 | "name": "Error" 14 | }, 15 | "stats": { 16 | "total_request_duration_ms": 383, 17 | "total_runtime_execution_duration_ms": 377, 18 | "runtime_processing_duration_ms": 6, 19 | "action_duration_ms": 40, 20 | "runtime_external_call_duration_ms": 331, 21 | "boot_duration_ms": 337, 22 | "network_duration_ms": 6 23 | } 24 | }, 25 | "error": { 26 | "id": "invalid_argument", 27 | "msg": "Invalid Argument" 28 | }, 29 | "started_at": "2021-08-16T19:14:04.218396333Z", 30 | "ended_at": "2021-08-16T19:14:04.602232335Z" 31 | } 32 | ], 33 | "created_at": "2021-08-16T19:14:04.218386241Z", 34 | "updated_at": "2021-08-16T19:14:04.218386241Z" 35 | } 36 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/active_users_count.json: -------------------------------------------------------------------------------- 1 | 123 -------------------------------------------------------------------------------- /src/test/resources/mgmt/authenticator_method_by_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"email|dev_7o0sei0Q5FJNLfk1", 3 | "type":"email", 4 | "confirmed":true, 5 | "email":"****@pmes****", 6 | "created_at":"2023-01-19T15:26:28.887Z" 7 | } 8 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/authenticator_method_create.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"email", 3 | "created_at":"2023-01-19T15:21:44.014Z", 4 | "email":"temp12@temp.com", 5 | "id":"email|dev_CgJUhSQ6jqPiQAsJ" 6 | } 7 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/authenticator_method_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "authenticators": [ 3 | { 4 | "id": "phone|id", 5 | "type": "phone", 6 | "confirmed": true, 7 | "phone_number": "XXXXXXXX0000", 8 | "created_at": "2023-02-01T18:44:46.483Z", 9 | "last_auth_at": "2023-02-07T20:29:33.547Z", 10 | "preferred_authentication_method": "sms", 11 | "authentication_methods": [ 12 | { 13 | "id": "sms|id", 14 | "type": "sms" 15 | } 16 | ] 17 | } 18 | ], 19 | "total": 3, 20 | "start": 0, 21 | "limit": 1 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/authenticator_method_update.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id":"email|dev_o05Io01uPXyvi87E", 4 | "type":"email", 5 | "email":"semp@pmes.com", 6 | "created_at":"2023-01-19T15:23:29.156Z" 7 | } 8 | ] 9 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/authenticator_method_update_by_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"email", 3 | "name":"123temp@temp123.com", 4 | "created_at":"2023-01-19T15:26:28.887Z", 5 | "email":"semp@pmes.com", 6 | "id":"email|dev_7o0sei0Q5FJNLfk1" 7 | } 8 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/blacklisted_tokens_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "aud": "1", 4 | "jti": "1" 5 | }, 6 | { 7 | "aud": "2", 8 | "jti": "2" 9 | } 10 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/branding_login_template.json: -------------------------------------------------------------------------------- 1 | { 2 | "body": "{%- auth0:head -%}{%- auth0:widget -%}" 3 | } 4 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/branding_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": { 3 | "page_background": "#000000", 4 | "primary": "#0E84F2" 5 | }, 6 | "logo_url": "https://test/logo.svg", 7 | "favicon_url": "https://test/favicon.svg", 8 | "font": { 9 | "url": "https://test/font.ttf" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/breached_password_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": true, 3 | "shields": [ 4 | "block", 5 | "admin_notification" 6 | ], 7 | "admin_notification_frequency": [ 8 | "immediately", 9 | "weekly" 10 | ], 11 | "method": "standard", 12 | "stage": { 13 | "pre-user-registration": { 14 | "shields": [ 15 | "admin_notification" 16 | ] 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/brute_force_configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": false, 3 | "shields": [ 4 | "block", 5 | "user_notification" 6 | ], 7 | "allowlist": [ 8 | "143.204.0.105", 9 | "2600:9000:208f:ca00:d:f5f5:b40:93a1" 10 | ], 11 | "mode": "count_per_identifier_and_ip", 12 | "max_attempts": 10 13 | } 14 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/client_credential.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "cred_asqwXXXIIadqq2T3zAXPwv", 3 | "name": "new cred", 4 | "credential_type": "public_key", 5 | "kid": "eKtBStP7BN2NiaoVrNGzb0QaRl4HlzyH1Lp00JB6Xj0", 6 | "alg": "RS256", 7 | "thumbprint": "thumb", 8 | "created_at": "2023-04-13T16:18:01.481Z", 9 | "updated_at": "2023-04-13T16:18:01.481Z", 10 | "expires_at": "2023-04-13T16:19:00.349Z" 11 | } 12 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/client_credential_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "cred_asqwdTaebdqq2T3zAXPwv", 4 | "name": "new cred", 5 | "credential_type": "public_key", 6 | "kid": "eKtBStP7BN2NV1MVrNGzb0QaRp0uHlzyH1Lje9JB6Xj0", 7 | "alg": "RS256", 8 | "thumbprint": "thumb", 9 | "created_at": "2023-04-13T16:18:01.481Z", 10 | "updated_at": "2023-04-13T16:18:01.481Z", 11 | "expires_at": "2023-04-13T16:19:00.349Z" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/client_grant.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "1", 3 | "client_id": "clientId1", 4 | "audience": "audience1", 5 | "scope": [ 6 | "openid", 7 | "profile" 8 | ] 9 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/client_grants_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "1", 4 | "client_id": "clientId1", 5 | "audience": "audience1", 6 | "scope": [ 7 | "openid", 8 | "profile" 9 | ] 10 | }, 11 | { 12 | "id": "2", 13 | "client_id": "clientId2", 14 | "audience": "audience2", 15 | "scope": [ 16 | "openid", 17 | "profile" 18 | ] 19 | } 20 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/client_grants_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "client_grants": [ 7 | { 8 | "id": "1", 9 | "client_id": "clientId1", 10 | "audience": "audience1", 11 | "scope": [ 12 | "openid", 13 | "profile" 14 | ] 15 | }, 16 | { 17 | "id": "2", 18 | "client_id": "clientId2", 19 | "audience": "audience2", 20 | "scope": [ 21 | "openid", 22 | "profile" 23 | ] 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/connection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "My connection1", 3 | "options": {}, 4 | "id": "con_0000000000000001", 5 | "strategy": "auth0", 6 | "enabled_clients": [ 7 | "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", 8 | "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" 9 | ], 10 | "metadata": { 11 | "key": "value" 12 | }, 13 | "is_domain_connection": true, 14 | "show_as_button": true 15 | } 16 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/connection_scim_configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "tenant_name": "dev-1", 3 | "connection_id": "con_0000000000000001", 4 | "connection_name": "New Connection", 5 | "strategy": "okta", 6 | "mapping": [ 7 | { 8 | "scim": "userName", 9 | "auth0": "preferred_username" 10 | }, 11 | { 12 | "scim": "emails[primary eq true].value", 13 | "auth0": "email" 14 | } 15 | ], 16 | "updated_on": "2025-01-22T11:56:24.461Z", 17 | "created_at": "2025-01-22T11:56:24.461Z", 18 | "user_id_attribute": "externalId" 19 | } 20 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/connection_scim_token.json: -------------------------------------------------------------------------------- 1 | { 2 | "token_id": "tok_000000001", 3 | "token": "tok_iwioqiwoqoqiwqoiwqwi", 4 | "scopes": [ 5 | "get:users" 6 | ], 7 | "created_at": "2025-01-23T12:34:46.321Z", 8 | "valid_until": "2025-01-23T12:51:26.321Z" 9 | } 10 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/connection_scim_tokens.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "token_id": "tok_000000001", 4 | "created_at": "2025-01-23T12:34:46.321Z", 5 | "scopes": [ 6 | "get:users" 7 | ], 8 | "valid_until": "2025-01-23T12:51:26.321Z" 9 | }, 10 | { 11 | "token_id": "tok_000000002", 12 | "created_at": "2025-01-22T12:09:23.313Z", 13 | "scopes": [ 14 | "get:users", 15 | "post:users", 16 | "patch:users", 17 | "delete:users", 18 | "put:users" 19 | ] 20 | } 21 | ] 22 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/connections_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "My connection1", 4 | "options": {}, 5 | "id": "con_0000000000000001", 6 | "strategy": "auth0", 7 | "enabled_clients": [ 8 | "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", 9 | "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" 10 | ], 11 | "metadata": { 12 | "key": "value" 13 | } 14 | }, 15 | { 16 | "name": "My connection2", 17 | "options": {}, 18 | "id": "con_0000000000000002", 19 | "strategy": "auth0", 20 | "enabled_clients": [ 21 | "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", 22 | "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" 23 | ] 24 | } 25 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/connections_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "connections": [ 7 | { 8 | "name": "My connection1", 9 | "options": {}, 10 | "id": "con_0000000000000001", 11 | "strategy": "auth0", 12 | "enabled_clients": [ 13 | "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", 14 | "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" 15 | ] 16 | }, 17 | { 18 | "name": "My connection2", 19 | "options": {}, 20 | "id": "con_0000000000000002", 21 | "strategy": "auth0", 22 | "enabled_clients": [ 23 | "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", 24 | "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" 25 | ] 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/custom_text_prompt.json: -------------------------------------------------------------------------------- 1 | { 2 | "signup": { 3 | "description": "Sign up to access amazing features for my login domain" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/daily_stats_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "date": "2014-01-01T05:00:00.000Z", 4 | "logins": 100 5 | }, 6 | { 7 | "date": "2014-01-01T05:00:00.000Z", 8 | "logins": 100 9 | } 10 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/default_connection_scim_configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "mapping": [ 3 | { 4 | "auth0": "preferred_username", 5 | "scim": "userName" 6 | }, 7 | { 8 | "auth0": "email", 9 | "scim": "emails[primary eq true].value" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/device_credentials.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "dcr_0INpgifmKRm5z", 3 | "device_name": "Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", 4 | "user_id": "auth0|121212", 5 | "type": "refresh_token", 6 | "client_id": "client987" 7 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/device_credentials_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "dcr_03YxCFDQfS7RT", 4 | "device_name": "Google Nexus 4 - 5.1.0 - API 22 - 768x1280", 5 | "user_id": "twitter|323232", 6 | "type": "refresh_token", 7 | "client_id": "client987" 8 | }, 9 | { 10 | "id": "dcr_0INpgifmKRm5z", 11 | "device_name": "Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", 12 | "user_id": "auth0|121212", 13 | "type": "refresh_token", 14 | "client_id": "client987" 15 | } 16 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/email_provider.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sendgrid", 3 | "enabled": true, 4 | "default_from_address": "", 5 | "credentials": { 6 | "api_user": "", 7 | "api_key": "your_mandrill_api_key", 8 | "accessKeyId": "", 9 | "secretAccessKey": "", 10 | "region": "", 11 | "smtp_host": "", 12 | "smtp_port": 0, 13 | "smtp_user": "", 14 | "smtp_pass": "" 15 | }, 16 | "settings": {} 17 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/email_template.json: -------------------------------------------------------------------------------- 1 | { 2 | "template": "welcome_email", 3 | "from": "me@auth0.com", 4 | "subject": "Some subject", 5 | "syntax": "liquid", 6 | "body": " ", 7 | "enabled": false 8 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/email_verification_ticket.json: -------------------------------------------------------------------------------- 1 | { 2 | "ticket": "https://login.auth0.com/lo/verify_email?client_id=nsaPS2p3cargoFy82WT7betaOPOt3qSh&tenant=mdocs&bewit=bmNlR01CcDNOUE1GeXVzODJXVDdyY1RUT1BPdDNxU2hcMTQzMDY2MjE4MVxuRTcxM0RSeUNlbEpzUUJmaFVaS3A1NEdJbWFzSUZMYzRTdEFtY2NMMXhZPVx7ImVtYWloojoiZGFtaWtww2NoQGhvdG1haWwuY29tIiwidGVuYW50IjoiZHNjaGVua2tjwWFuIiwiY2xpZW50X2lkIjoibmNlR01CcDNOUE1GeXVzODJXVDdyY1RUT1BPiiqxU2giLCJjb25uZWN0aW9uIjoiRGFtaWmsdiwicmVzdWx0VXJsIjoiIn0" 3 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/empty_list.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /src/test/resources/mgmt/enabled_clients_for_connection.json: -------------------------------------------------------------------------------- 1 | { 2 | "clients": [ 3 | { 4 | "client_id": "client-1" 5 | }, 6 | { 7 | "client_id": "client-2" 8 | } 9 | ], 10 | "next": "next" 11 | } 12 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/encryption_key.json: -------------------------------------------------------------------------------- 1 | { 2 | "kid": "kid", 3 | "type": "tenant-master-key", 4 | "state": "active", 5 | "created_at": "2024-10-16T10:50:44.107Z", 6 | "updated_at": "2024-10-24T06:47:24.899Z", 7 | "parent_kid": "pkid", 8 | "public_key": "pkey" 9 | } 10 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/encryption_keys_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "kid": "kid-1", 4 | "type": "customer-provided-root-key", 5 | "state": "pre-activation", 6 | "created_at": "2024-10-24T08:02:18.029Z", 7 | "updated_at": "2024-10-24T08:02:18.029Z", 8 | "parent_kid": null, 9 | "public_key": null 10 | }, 11 | { 12 | "kid": "kid-2", 13 | "type": "tenant-master-key", 14 | "state": "active", 15 | "created_at": "2024-10-24T06:47:23.749Z", 16 | "updated_at": "2024-10-24T06:47:23.749Z", 17 | "parent_kid": "pkid-1", 18 | "public_key": null 19 | }, 20 | { 21 | "kid": "kid-3", 22 | "type": "tenant-master-key", 23 | "state": "destroyed", 24 | "created_at": "2024-10-16T10:50:44.107Z", 25 | "updated_at": "2024-10-24T06:47:24.899Z", 26 | "parent_kid": "pkid-2", 27 | "public_key": null 28 | } 29 | ] 30 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/error_with_message.json: -------------------------------------------------------------------------------- 1 | { 2 | "statusCode": 400, 3 | "error": "Bad Request", 4 | "message": "Query validation error: 'String 'invalid_field' does not match pattern. Must be a comma separated list of the following values: allowed_logout_urls,change_password.", 5 | "errorCode": "invalid_query_string" 6 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/event_log.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2016-02-23T19:57:29.532Z", 3 | "type": "sapi", 4 | "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", 5 | "client_name": "My Game", 6 | "ip": "190.257.209.19", 7 | "location_info": {}, 8 | "details": {}, 9 | "user_id": "auth0|56c75c4e42b6359e98374bc2" 10 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/event_logs_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "date": "2016-02-23T19:57:29.532Z", 4 | "type": "sapi", 5 | "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", 6 | "client_name": "My Game", 7 | "ip": "190.257.209.19", 8 | "location_info": {}, 9 | "details": {}, 10 | "user_id": "auth0|56c75c4e42b6359e98374bc2" 11 | }, 12 | { 13 | "date": "2016-03-23T19:57:31.532Z", 14 | "type": "lapi", 15 | "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", 16 | "client_name": "My Application", 17 | "ip": "190.257.209.29", 18 | "location_info": {}, 19 | "details": {}, 20 | "user_id": "auth0|56c75c4e42b6359e98374bc2" 21 | } 22 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/event_logs_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "logs": [ 7 | { 8 | "date": "2016-02-23T19:57:29.532Z", 9 | "type": "sapi", 10 | "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", 11 | "client_name": "My Game", 12 | "ip": "190.257.209.19", 13 | "location_info": {}, 14 | "details": {}, 15 | "user_id": "auth0|56c75c4e42b6359e98374bc2" 16 | }, 17 | { 18 | "date": "2016-03-23T19:57:31.532Z", 19 | "type": "lapi", 20 | "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", 21 | "client_name": "My Application", 22 | "ip": "190.257.209.29", 23 | "location_info": {}, 24 | "details": {}, 25 | "user_id": "auth0|56c75c4e42b6359e98374bc2" 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/grants_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "1", 4 | "clientID": "clientId1", 5 | "audience": "audience1", 6 | "user_id": "userId", 7 | "scope": [ 8 | "openid", 9 | "profile" 10 | ] 11 | }, 12 | { 13 | "id": "2", 14 | "clientID": "clientId2", 15 | "user_id": "userId", 16 | "audience": "audience2", 17 | "scope": [ 18 | "openid", 19 | "profile" 20 | ] 21 | } 22 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/grants_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "grants": [ 7 | { 8 | "id": "1", 9 | "clientID": "clientId1", 10 | "audience": "audience1", 11 | "user_id": "userId", 12 | "scope": [ 13 | "openid", 14 | "profile" 15 | ] 16 | }, 17 | { 18 | "id": "2", 19 | "clientID": "clientId2", 20 | "user_id": "userId", 21 | "audience": "audience2", 22 | "scope": [ 23 | "openid", 24 | "profile" 25 | ] 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_authentication_policies_list.json: -------------------------------------------------------------------------------- 1 | ["all-applications"] 2 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_enrollment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "dev_3213TGOhu0ea", 3 | "status": "confirmed", 4 | "type": "pn", 5 | "name": "Nexus 5X", 6 | "phone_number": null, 7 | "identifier": "f491f858432059", 8 | "enrolled_at": "2017-01-18T17:45:08.328Z", 9 | "auth_method": "", 10 | "last_auth": "2017-07-12T17:56:26.804Z" 11 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_enrollment_ticket.json: -------------------------------------------------------------------------------- 1 | { 2 | "user_id": "u123", 3 | "email": "me@auth0.com", 4 | "send_mail": false, 5 | "ticket_id": "12345679", 6 | "ticket_url": "https://auth0.com/guardian/tickets/123" 7 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_enrollments_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "dev_3213TGOhu0ea", 4 | "status": "confirmed", 5 | "type": "pn", 6 | "name": "Nexus 5X", 7 | "phone_number": null, 8 | "identifier": "f491f858432059", 9 | "enrolled_at": "2017-01-18T17:45:08.328Z", 10 | "auth_method": "", 11 | "last_auth": "" 12 | }, 13 | { 14 | "id": "dev_3213TGOhu0ea", 15 | "status": "confirmed", 16 | "type": "pn", 17 | "name": "Nexus 5X", 18 | "phone_number": null, 19 | "identifier": "f491f858432059", 20 | "enrolled_at": "2017-01-18T17:45:08.328Z", 21 | "auth_method": "", 22 | "last_auth": "" 23 | } 24 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_factor.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": false, 3 | "trial_expired": false, 4 | "name": "Second" 5 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_factors_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "enabled": true, 4 | "trial_expired": true, 5 | "name": "First" 6 | }, 7 | { 8 | "enabled": false, 9 | "trial_expired": false, 10 | "name": "Second" 11 | } 12 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_sns_factor_provider.json: -------------------------------------------------------------------------------- 1 | { 2 | "aws_access_key_id": "123123132", 3 | "aws_secret_access_key": "aac", 4 | "aws_region": "us", 5 | "sns_apns_platform_application_arn": "132", 6 | "sns_gcm_platform_application_arn": "3123" 7 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_sns_factor_provider_empty.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_templates.json: -------------------------------------------------------------------------------- 1 | { 2 | "enrollment_message": "Enroll using..", 3 | "verification_message": "Verify your number.." 4 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_twilio_factor_provider_empty.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_twilio_factor_provider_with_from.json: -------------------------------------------------------------------------------- 1 | { 2 | "from": "+156789", 3 | "messaging_service_sid": null, 4 | "auth_token": "aToKen", 5 | "sid": "3123" 6 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/guardian_twilio_factor_provider_with_messaging_service_sid.json: -------------------------------------------------------------------------------- 1 | { 2 | "from": null, 3 | "messaging_service_sid": "aac", 4 | "auth_token": "aToKen", 5 | "sid": "3123" 6 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/identities_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "connection": "Someconnetion", 4 | "user_id": "5457edea1b8f22891a000002", 5 | "provider": "facebook", 6 | "isSocial": true 7 | }, 8 | { 9 | "connection": "Initial-Connection", 10 | "user_id": "5457edea1b8f22891a000004", 11 | "provider": "auth0", 12 | "isSocial": false 13 | } 14 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/invitation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uinv_Q3lgZXkis997Rqs3", 3 | "client_id": "klCnbSD1U1YAIeLRdvEAFMwDoOX5bfsb", 4 | "inviter": { 5 | "name": "timmy" 6 | }, 7 | "invitee": { 8 | "email": "timmy@domain.com" 9 | }, 10 | "invitation_url": "https://some-domain.auth0.com/login?invitation=U0o1uoXAl1VPkKbZlaRWEWJadkeed1E&organization=org_W3OHp07dfbjhHuWK&organization_name=timmy-org", 11 | "ticket_id": "U0o1uoXAl1VPkKbZla0a833soMUMOo1E", 12 | "created_at": "2021-03-31T19:08:40.295Z", 13 | "expires_at": "2021-04-07T19:08:40.295Z", 14 | "organization_id": "org_W30s833MRbjhHuWK" 15 | } 16 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/job.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "completed", 3 | "type": "verification_email", 4 | "created_at": "", 5 | "id": "job_0000000000000001", 6 | "connection_id": "conn_1", 7 | "location": "https://auth0.com/jobs", 8 | "percentage_done": 100, 9 | "time_left_seconds": 0 10 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/job_post_users_exports.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "users_export", 3 | "status": "pending", 4 | "connection_id": "con_123456789", 5 | "format": "csv", 6 | "connection": "Username-Password-Authentication", 7 | "created_at": "2020-04-07T18:07:32.792Z", 8 | "id": "job_123456789" 9 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/job_post_users_imports.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "users_import", 3 | "status": "pending", 4 | "connection_id": "con_123456789", 5 | "connection": "Username-Password-Authentication", 6 | "created_at": "2020-04-08T21:25:31.675Z", 7 | "id": "job_123456789" 8 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/job_post_users_imports_input.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "email": "fake_user_1@fakers.com", 4 | "email_verified": false, 5 | "app_metadata": { 6 | "roles": [ 7 | "admin" 8 | ], 9 | "plan": "premium" 10 | }, 11 | "user_metadata": { 12 | "theme": "light" 13 | }, 14 | "unknown_property": "yes" 15 | }, 16 | { 17 | "email": "fake_user_2@fakers.com", 18 | "email_verified": true, 19 | "app_metadata": { 20 | "roles": [ 21 | "admin" 22 | ], 23 | "plan": "free" 24 | }, 25 | "user_metadata": { 26 | "theme": "light" 27 | } 28 | } 29 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/job_post_verification_email.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "completed", 3 | "type": "verification_email", 4 | "created_at": "", 5 | "id": "job_0000000000000001" 6 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/key.json: -------------------------------------------------------------------------------- 1 | { 2 | "kid": "21hi274Rp02112mgkUGma", 3 | "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", 4 | "pkcs7": "-----BEGIN PKCS7-----\r\nMIIDPA....t8xAA==\r\n-----END PKCS7-----", 5 | "current": true, 6 | "next": false, 7 | "previous": false, 8 | "current_since": "2021-08-16T20:26:42.253086110Z", 9 | "current_until": "2021-08-16T20:26:42.253086110Z", 10 | "fingerprint": "CC:FB:DD:D8:9A:B5:DE:1B:F0:CC:36:D2:99:59:21:12:03:DD:A8:25", 11 | "thumbprint": "CCFBDDD89AB5DE1BF0CC36D29959211203DDA825", 12 | "revoked": false, 13 | "revoked_at": "2021-08-16T20:26:42.253086110Z" 14 | } 15 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/key_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "kid": "21hi274Rp02112mgkUGma", 4 | "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", 5 | "pkcs7": "-----BEGIN PKCS7-----\r\nMIIDPA....t8xAA==\r\n-----END PKCS7-----", 6 | "current": true, 7 | "next": false, 8 | "previous": false, 9 | "current_since": "", 10 | "current_until": "", 11 | "fingerprint": "CC:FB:DD:D8:9A:B5:DE:1B:F0:CC:36:D2:99:59:21:12:03:DD:A8:25", 12 | "thumbprint": "CCFBDDD89AB5DE1BF0CC36D29959211203DDA825", 13 | "revoked": false, 14 | "revoked_at": "" 15 | }, 16 | { 17 | "kid": "123456789asdfghj", 18 | "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", 19 | "pkcs7": "-----BEGIN PKCS7-----\r\nMIIDPA....t8xAA==\r\n-----END PKCS7-----", 20 | "current": true, 21 | "next": false, 22 | "previous": false, 23 | "current_since": "", 24 | "current_until": "", 25 | "fingerprint": "CC:FB:DD:D8:9A:B5:DE:1B:F0:CC:36:D2:99:59:21:12:03:DD:A8:25", 26 | "thumbprint": "CCFBDDD89AB5DE1BF0CC36D29959211203DDA825", 27 | "revoked": false, 28 | "revoked_at": "" 29 | } 30 | ] 31 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/key_revoke.json: -------------------------------------------------------------------------------- 1 | { 2 | "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", 3 | "kid": "21hi274Rp02112mgkUGma" 4 | } 5 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/key_rotate.json: -------------------------------------------------------------------------------- 1 | { 2 | "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", 3 | "kid": "21hi274Rp02112mgkUGma" 4 | } 5 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/log_stream.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "id": "123", 4 | "name": "log stream 1", 5 | "status": "active", 6 | "type": "http", 7 | "sink": { 8 | "httpContentFormat": "JSONLINES", 9 | "httpContentType": "application/json", 10 | "httpAuthorization": "abc123", 11 | "httpEndpoint": "https//me.org" 12 | }, 13 | "filters": [ 14 | { 15 | "type": "category", 16 | "name": "auth.ancillary.success" 17 | }, 18 | { 19 | "type": "category", 20 | "name": "auth.ancillary.fail" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/log_streams_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "123", 4 | "name": "log stream 1", 5 | "status": "active", 6 | "type": "http", 7 | "sink": { 8 | "httpContentFormat": "JSONLINES", 9 | "httpContentType": "application/json", 10 | "httpAuthorization": "abc123", 11 | "httpEndpoint": "https//me.org" 12 | }, 13 | "filters": [ 14 | { 15 | "type": "category", 16 | "name": "auth.ancillary.success" 17 | }, 18 | { 19 | "type": "category", 20 | "name": "auth.ancillary.fail" 21 | } 22 | ] 23 | }, 24 | { 25 | "id": "456", 26 | "name": "log stream 2", 27 | "status": "paused", 28 | "type": "datadog", 29 | "sink": { 30 | "datadogRegion": "region", 31 | "datadogApiKey": "abc123", 32 | "httpAuthorization": "abc123", 33 | "httpEndpoint": "https//me.org" 34 | }, 35 | "filters": [ 36 | { 37 | "type": "category", 38 | "name": "auth.ancillary.success" 39 | }, 40 | { 41 | "type": "category", 42 | "name": "auth.ancillary.fail" 43 | } 44 | ] 45 | } 46 | ] 47 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/multipart_sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "John Doe", 3 | "age": 99 4 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "org_VSZmSnzd0m9ITBZ7", 3 | "name": "org-1", 4 | "display_name": "org 1", 5 | "branding": { 6 | "logo_uri": "https://some-url.com/", 7 | "colors": { 8 | "primary": "#FF0000", 9 | "page_background": "#FF0000" 10 | } 11 | }, 12 | "metadata": { 13 | "key1": "val1" 14 | }, 15 | "enabled_connections": [ 16 | { 17 | "connection_id": "con-1", 18 | "assign_membership_on_login": false 19 | } 20 | ], 21 | "token_quota": { 22 | "client_credentials": { 23 | "per_day": 100, 24 | "per_hour": 20, 25 | "enforce": true 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_client_grant.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "1", 3 | "client_id": "clientId1", 4 | "audience": "audience1", 5 | "scope": [ 6 | "openid", 7 | "profile" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_client_grants.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "cgr_4pI9a42haOLLWnwq", 4 | "client_id": "client-id", 5 | "audience": "https://api-identifier", 6 | "scope": [ 7 | "update:items", 8 | "read:messages" 9 | ] 10 | }, 11 | { 12 | "id": "cgr_D018f9kmBmwbZod", 13 | "client_id": "client-id", 14 | "audience": "https://api-identifier", 15 | "scope": [] 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_client_grants_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "total": 13, 3 | "start": 0, 4 | "limit": 1, 5 | "client_grants": [ 6 | { 7 | "id": "cgr_3aidkk3skLVOM3Ay7", 8 | "client_id": "client-id", 9 | "audience": "https://api-identifier/", 10 | "scope": [ 11 | "read:messages" 12 | ] 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_connection.json: -------------------------------------------------------------------------------- 1 | { 2 | "connection_id": "con_At4BWXhV3lKv82jd", 3 | "assign_membership_on_login": false, 4 | "show_as_button": true 5 | } 6 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_connections_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "connection_id": "con_At4BWXhV3lKv82jd", 4 | "assign_membership_on_login": false, 5 | "show_as_button": true, 6 | "connection": { 7 | "name": "google-oauth2", 8 | "strategy": "google-oauth2" 9 | } 10 | }, 11 | { 12 | "connection_id": "con_kai93HmEDCs8ai3d", 13 | "assign_membership_on_login": true, 14 | "show_as_button": true, 15 | "connection": { 16 | "name": "Username-Password-Authentication", 17 | "strategy": "auth0" 18 | } 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_connections_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled_connections": [ 3 | { 4 | "connection_id": "con_At4BWXhV3lKv82jd", 5 | "assign_membership_on_login": false, 6 | "show_as_button": true, 7 | "connection": { 8 | "name": "google-oauth2", 9 | "strategy": "google-oauth2" 10 | } 11 | }, 12 | { 13 | "connection_id": "con_kai93HmEDCs8ai3d", 14 | "assign_membership_on_login": true, 15 | "show_as_button": true, 16 | "connection": { 17 | "name": "Username-Password-Authentication", 18 | "strategy": "auth0" 19 | } 20 | } 21 | ], 22 | "start": 0, 23 | "limit": 20, 24 | "total": 2 25 | } 26 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_member_roles_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "rol_YMmM7zN6kqtus91", 4 | "name": "test role", 5 | "description": "role for testing" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_member_roles_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "roles": [ 3 | { 4 | "id": "rol_YMmM7zN6kqtus91", 5 | "name": "test role", 6 | "description": "role for testing" 7 | } 8 | ], 9 | "start": 0, 10 | "limit": 50, 11 | "total": 1 12 | } 13 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_members_checkpoint_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "members": [ 3 | { 4 | "user_id": "auth0|605a1f57cbeb2c0070fdf123", 5 | "email": "dave@domain.com", 6 | "picture": "https://domain.com/img.png", 7 | "name": "dave" 8 | }, 9 | { 10 | "user_id": "auth0|605a0fc1bef67f006851a123", 11 | "email": "eric@domain.com", 12 | "picture": "https://domain.com/img.png", 13 | "name": "eric" 14 | }, 15 | { 16 | "user_id": "auth0|5f5103d20e634f006d25a123", 17 | "email": "john@domain.com", 18 | "picture": "https://domain.com/img.png", 19 | "name": "john" 20 | } 21 | ], 22 | "next": "MjAyMS0wMy0yOSAxNjo1MDo09s44NDYxODcrMDAsb3JnX2Y0VXZUbG1iSWd2005zTGw" 23 | } 24 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_members_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "user_id": "auth0|605a1f57cbeb2c0070fdf123", 4 | "email": "dave@domain.com", 5 | "picture": "https://domain.com/img.png", 6 | "name": "dave" 7 | }, 8 | { 9 | "user_id": "auth0|605a0fc1bef67f006851a123", 10 | "email": "eric@domain.com", 11 | "picture": "https://domain.com/img.png", 12 | "name": "eric" 13 | }, 14 | { 15 | "user_id": "auth0|5f5103d20e634f006d25a123", 16 | "email": "john@domain.com", 17 | "picture": "https://domain.com/img.png", 18 | "name": "john" 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organization_members_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "members": [ 3 | { 4 | "user_id": "auth0|605a1f57cbeb2c0070fdf123", 5 | "email": "dave@domain.com", 6 | "picture": "https://domain.com/img.png", 7 | "name": "dave" 8 | }, 9 | { 10 | "user_id": "auth0|605a0fc1bef67f006851a123", 11 | "email": "eric@domain.com", 12 | "picture": "https://domain.com/img.png", 13 | "name": "eric" 14 | }, 15 | { 16 | "user_id": "auth0|5f5103d20e634f006d25a123", 17 | "email": "john@domain.com", 18 | "picture": "https://domain.com/img.png", 19 | "name": "john" 20 | } 21 | ], 22 | "start": 0, 23 | "limit": 20, 24 | "total": 3 25 | } 26 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organizations_checkpoint_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "organizations": [ 3 | { 4 | "id": "org_VSZmSnzd0m9ITBZ7", 5 | "name": "org-1", 6 | "display_name": "org 1", 7 | "branding": { 8 | "logo_uri": "https://some-url.com/", 9 | "colors": { 10 | "primary": "#FF0000", 11 | "page_background": "#FF0000" 12 | } 13 | }, 14 | "metadata": { 15 | "key1": "val1" 16 | } 17 | }, 18 | { 19 | "id": "org_W3OH9wtMRbjhHuWK", 20 | "name": "org-2", 21 | "display_name": "org 2" 22 | } 23 | ], 24 | "next": "MjAyMS0wMy0yOSAxNjo1MDo09s44NDYxODcrMDAsb3JnX2Y0VXZUbG1iSWd2005zTGw" 25 | } 26 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organizations_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "org_VSZmSnzd0m9ITBZ7", 4 | "name": "org-1", 5 | "display_name": "org 1", 6 | "branding": { 7 | "logo_uri": "https://some-url.com/", 8 | "colors": { 9 | "primary": "#FF0000", 10 | "page_background": "#FF0000" 11 | } 12 | }, 13 | "metadata": { 14 | "key1": "val1" 15 | }, 16 | "token_quota": { 17 | "client_credentials": { 18 | "per_day": 100, 19 | "per_hour": 20, 20 | "enforce": true 21 | } 22 | } 23 | }, 24 | { 25 | "id": "org_W3OH9wtMRbjhHuWK", 26 | "name": "org-2", 27 | "display_name": "org 2" 28 | } 29 | ] 30 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/organizations_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "organizations": [ 3 | { 4 | "id": "org_VSZmSnzd0m9ITBZ7", 5 | "name": "org-1", 6 | "display_name": "org 1", 7 | "branding": { 8 | "logo_uri": "https://some-url.com/", 9 | "colors": { 10 | "primary": "#FF0000", 11 | "page_background": "#FF0000" 12 | } 13 | }, 14 | "metadata": { 15 | "key1": "val1" 16 | } 17 | }, 18 | { 19 | "id": "org_W3OH9wtMRbjhHuWK", 20 | "name": "org-2", 21 | "display_name": "org 2" 22 | } 23 | ], 24 | "start": 0, 25 | "limit": 20, 26 | "total": 2 27 | } 28 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/partials_prompt.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/password_change_ticket.json: -------------------------------------------------------------------------------- 1 | { 2 | "ticket": "https://login.auth0.com/lo/verify_email?client_id=nsaPS2p3cargoFy82WT7betaOPOt3qSh&tenant=mdocs&bewit=bmNlR01CcDNOUE1GeXVzODJXVDdyY1RUT1BPdDNxU2hcMTQzMDY2MjE4MVxuRTcxM0RSeUNlbEpzUUJmaFVaS3A1NEdJbWFzSUZMYzRTdEFtY2NMMXhZPVx7ImVtYWloojoiZGFtaWtww2NoQGhvdG1haWwuY29tIiwidGVuYW50IjoiZHNjaGVua2tjwWFuIiwiY2xpZW50X2lkIjoibmNlR01CcDNOUE1GeXVzODJXVDdyY1RUT1BPiiqxU2giLCJjb25uZWN0aW9uIjoiRGFtaWmsdiwicmVzdWx0VXJsIjoiIn0" 3 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/prompt.json: -------------------------------------------------------------------------------- 1 | { 2 | "universal_login_experience": "new", 3 | "identifier_first": true, 4 | "webauthn_platform_first_factor": true 5 | } 6 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/rate_limit_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "statusCode":429, 3 | "error":"Too Many Requests", 4 | "message":"Global limit has been reached", 5 | "errorCode":"too_many_requests" 6 | } 7 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/recovery_code.json: -------------------------------------------------------------------------------- 1 | { 2 | "recovery_code": "code" 3 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/refresh_token.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "tokenId1", 3 | "user_id": "userId1", 4 | "created_at": "2024-06-26T09:10:26.643Z", 5 | "idle_expires_at": "2024-06-26T09:10:27.131Z", 6 | "expires_at": "2024-07-03T09:10:26.643Z", 7 | "device": { 8 | "initial_asn": "1234", 9 | "initial_ip": "203.0.113.1", 10 | "initial_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", 11 | "last_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", 12 | "last_ip": "203.0.113.1", 13 | "last_asn": "1234" 14 | }, 15 | "client_id": "clientId1", 16 | "session_id": "sessionId1", 17 | "rotating": false, 18 | "resource_servers": [ 19 | { 20 | "audience": "https://api.example.com", 21 | "scopes": [ 22 | "read:examples", 23 | "write:examples" 24 | ] 25 | } 26 | ], 27 | "last_exchanged_at": "2024-07-03T09:10:26.643Z" 28 | } 29 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/role.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "1", 3 | "name": "roleId", 4 | "description": "description1" 5 | } 6 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/role_permissions_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "resource_server_identifier": "resourceServerIdentifier1", 4 | "permission_name": "permission1", 5 | "resource_server_name": "resourceServerName1", 6 | "description": "description1" 7 | }, 8 | { 9 | "resource_server_identifier": "resourceServerIdentifier2", 10 | "permission_name": "permission2", 11 | "resource_server_name": "resourceServerName2", 12 | "description": "description2" 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/role_permissions_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "permissions": [ 7 | { 8 | "resource_server_identifier": "resourceServerIdentifier1", 9 | "permission_name": "permission1", 10 | "resource_server_name": "resourceServerName1", 11 | "description": "description1" 12 | }, 13 | { 14 | "resource_server_identifier": "resourceServerIdentifier2", 15 | "permission_name": "permission2", 16 | "resource_server_name": "resourceServerName2", 17 | "description": "description2" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/role_users_checkpoint_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "users": [ 3 | { 4 | "email": "john.doe@gmail.com", 5 | "user_id": "usr_5457edea1b8f33391a000004", 6 | "picture": "", 7 | "name": "" 8 | }, 9 | { 10 | "email": "john.doe2@gmail.com", 11 | "user_id": "usr_5457edea1b8f33391a000004", 12 | "picture": "", 13 | "name": "" 14 | } 15 | ], 16 | "next": "MjAyMS0wMy0yOSAxNjo1MDo09s44NDYxODcrMDAsb3JnX2Y0VXZUbG1iSWd2005zTGw" 17 | } 18 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/role_users_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "email": "john.doe@gmail.com", 4 | "user_id": "usr_5457edea1b8f33391a000004", 5 | "picture": "", 6 | "name": "" 7 | }, 8 | { 9 | "email": "john.doe2@gmail.com", 10 | "user_id": "usr_5457edea1b8f33391a000004", 11 | "picture": "", 12 | "name": "" 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/role_users_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "users": [ 7 | { 8 | "email": "john.doe@gmail.com", 9 | "user_id": "usr_5457edea1b8f33391a000004", 10 | "picture": "", 11 | "name": "" 12 | }, 13 | { 14 | "email": "john.doe2@gmail.com", 15 | "user_id": "usr_5457edea1b8f33391a000004", 16 | "picture": "", 17 | "name": "" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/roles_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "1", 4 | "name": "roleId", 5 | "description": "description1" 6 | }, 7 | { 8 | "id": "2", 9 | "name": "roleId", 10 | "description": "description2" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/roles_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "roles": [ 7 | { 8 | "id": "1", 9 | "name": "roleId1", 10 | "description": "description1" 11 | }, 12 | { 13 | "id": "2", 14 | "name": "roleId2", 15 | "description": "description2" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/rule.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rule_1", 3 | "id": "con_0000000000000001", 4 | "enabled": true, 5 | "script": "function (user, context, callback) {\n callback(null, user, context);\n}", 6 | "order": 1, 7 | "stage": "login_success" 8 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/rules_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "rules_config_1" 3 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/rules_configs_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "rules_config_1" 4 | }, 5 | { 6 | "key": "rules_config_2" 7 | } 8 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/rules_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "rule_1", 4 | "id": "con_0000000000000001", 5 | "enabled": true, 6 | "script": "function (user, context, callback) {\n callback(null, user, context);\n}", 7 | "order": 1, 8 | "stage": "login_success" 9 | }, 10 | { 11 | "name": "rule_2", 12 | "id": "con_0000000000000002", 13 | "enabled": true, 14 | "script": "function (user, context, callback) {\n callback(null, user, context);\n}", 15 | "order": 1, 16 | "stage": "login_success" 17 | } 18 | ] -------------------------------------------------------------------------------- /src/test/resources/mgmt/rules_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "rules": [ 7 | { 8 | "name": "rule_1", 9 | "id": "con_0000000000000001", 10 | "enabled": true, 11 | "script": "function (user, context, callback) {\n callback(null, user, context);\n}", 12 | "order": 1, 13 | "stage": "login_success" 14 | }, 15 | { 16 | "name": "rule_2", 17 | "id": "con_0000000000000002", 18 | "enabled": true, 19 | "script": "function (user, context, callback) {\n callback(null, user, context);\n}", 20 | "order": 1, 21 | "stage": "login_success" 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/scope.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Read Client Grants", 3 | "value": "read:client_grants" 4 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/self_service_profile.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "id", 3 | "name": "Test", 4 | "description": "This is for Test", 5 | "user_attributes": [ 6 | { 7 | "name": "Phone", 8 | "description": "This is Phone Number", 9 | "is_optional": true 10 | } 11 | ], 12 | "branding": { 13 | "logo_url": "https://www.google.com", 14 | "colors": { 15 | "primary": "#ffffff" 16 | } 17 | }, 18 | "allowed_strategies": [ 19 | "oidc" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/self_service_profile_custom_text.json: -------------------------------------------------------------------------------- 1 | { 2 | "introduction": "Welcome! With only a few steps" 3 | } 4 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/self_service_profile_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "id", 3 | "name": "Test", 4 | "description": "This is a Test", 5 | "user_attributes": [ 6 | { 7 | "name": "Phone", 8 | "description": "This is Phone Number", 9 | "is_optional": true 10 | } 11 | ], 12 | "allowed_strategies": [ 13 | "oidc" 14 | ], 15 | "created_at": "2024-12-20T09:32:13.885Z", 16 | "updated_at": "2024-12-20T09:32:13.885Z", 17 | "branding": { 18 | "logo_url": "https://www.google.com", 19 | "colors": { 20 | "primary": "#ffffff" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/self_service_profile_sso_ticket.json: -------------------------------------------------------------------------------- 1 | { 2 | "ticket": "https://example.auth0.com/self-service/connections-flow?ticket=ticket-1234" 3 | } 4 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/self_service_profile_sso_ticket_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "connection_config": { 3 | "name": "okta", 4 | "display_name": "okta connection", 5 | "is_domain_connection": true, 6 | "show_as_button": true, 7 | "metadata": { 8 | "key1":"value1" 9 | }, 10 | "options":{ 11 | "icon_url":"url", 12 | "domain_aliases":[ 13 | "acme.corp", 14 | "okta.com" 15 | ], 16 | "idpinitiated": { 17 | "enabled": true, 18 | "client_id": "client-1", 19 | "client_protocol": "oauth2", 20 | "client_authorizequery": "response_type=code&scope=openid%20profile%20email" 21 | } 22 | } 23 | }, 24 | "enabled_clients": [ 25 | "client-1" 26 | ], 27 | "enabled_organizations": [ 28 | { 29 | "organization_id": "org_1", 30 | "assign_membership_on_login": true, 31 | "show_as_button": true 32 | } 33 | ], 34 | "ttl_sec": 0, 35 | "domain_aliases_config": { 36 | "domain_verification": "none" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/session.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "sessionId1", 3 | "user_id": "userId1", 4 | "created_at": "2024-09-04T06:41:46.145Z", 5 | "updated_at": "2024-09-04T06:41:46.621Z", 6 | "authenticated_at": "2024-09-04T06:41:46.145Z", 7 | "authentication": { 8 | "methods": [ 9 | { 10 | "name": "federated", 11 | "timestamp": "2024-09-04T06:41:46.145Z" 12 | } 13 | ] 14 | }, 15 | "idle_expires_at": "2024-09-07T06:41:46.622Z", 16 | "expires_at": "2024-09-11T06:41:46.145Z", 17 | "device": { 18 | "initial_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36", 19 | "initial_asn": "1234", 20 | "initial_ip": "134.1.15.0", 21 | "last_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36", 22 | "last_ip": "134.1.15.0", 23 | "last_asn": "1234" 24 | }, 25 | "clients": [ 26 | { 27 | "client_id": "clientId1" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/suspicious_ip_throttling_configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": false, 3 | "shields": [ 4 | "block", 5 | "admin_notification" 6 | ], 7 | "allowlist": [ 8 | "143.204.0.105", 9 | "2600:9000:208f:ca00:d:f5f5:b40:93a1" 10 | ], 11 | "stage": { 12 | "pre-login": { 13 | "max_attempts": 100, 14 | "rate": 864000 15 | }, 16 | "pre-user-registration": { 17 | "max_attempts": 50, 18 | "rate": 1728000 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/user_blocks.json: -------------------------------------------------------------------------------- 1 | { 2 | "blocked_for": [ 3 | { 4 | "identifier": "john.doe@gmail.com", 5 | "ip": "10.0.0.1" 6 | }, 7 | { 8 | "identifier": "john.doe@gmail.com", 9 | "ip": "10.0.0.2" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /src/test/resources/mgmt/user_permissions_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "permissions": [ 7 | { 8 | "resource_server_identifier": "resourceServerIdentifier1", 9 | "permission_name": "permission1", 10 | "resource_server_name": "resourceServerName1", 11 | "description": "description1" 12 | }, 13 | { 14 | "resource_server_identifier": "resourceServerIdentifier2", 15 | "permission_name": "permission2", 16 | "resource_server_name": "resourceServerName2", 17 | "description": "description2" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/user_roles_paged_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "start": 0, 3 | "length": 14, 4 | "total": 14, 5 | "limit": 50, 6 | "roles": [ 7 | { 8 | "id": "1", 9 | "name": "roleId1", 10 | "description": "description1" 11 | }, 12 | { 13 | "id": "2", 14 | "name": "roleId2", 15 | "description": "description2" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/test/resources/mgmt/user_sessions.json: -------------------------------------------------------------------------------- 1 | { 2 | "sessions": [ 3 | { 4 | "id": "sessionId1", 5 | "user_id": "userId1", 6 | "created_at": "2024-06-26T09:10:26.643Z", 7 | "updated_at": "2024-06-26T09:10:27.131Z", 8 | "authenticated_at": "2024-06-26T09:10:26.643Z", 9 | "authentication": { 10 | "methods": [ 11 | { 12 | "name": "pwd", 13 | "timestamp": "2024-06-26T09:10:26.643Z" 14 | } 15 | ] 16 | }, 17 | "idle_expires_at": "2024-06-26T09:40:27.131Z", 18 | "expires_at": "2024-07-03T09:10:26.643Z", 19 | "device": { 20 | "initial_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36", 21 | "initial_asn": "1234", 22 | "initial_ip": "203.0.113.1", 23 | "last_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", 24 | "last_ip": "203.0.113.1", 25 | "last_asn": "1234" 26 | }, 27 | "clients": [ 28 | { 29 | "client_id": "clientId1" 30 | } 31 | ] 32 | } 33 | ], 34 | "next": "sessionId1", 35 | "total": 9 36 | } 37 | -------------------------------------------------------------------------------- /src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker: -------------------------------------------------------------------------------- 1 | mock-maker-inline --------------------------------------------------------------------------------