<commit_before>// Copyright  Microsoft Open Technologies, Inc.
//
// All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
// OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
// ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A
// PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
//
// See the Apache License, Version 2.0 for the specific language
// governing permissions and limitations under the License.

package com.microsoft.adal;

/**
 * Error codes
 */
public enum ADALError {

    DEVELOPER_AUTHORITY_CAN_NOT_BE_VALIDED("Authority validation returned an error"),

    DEVELOPER_AUTHORITY_IS_NOT_VALID_INSTANCE("Authority is not a valid instance"),

    DEVELOPER_AUTHORITY_IS_NOT_VALID_URL("Authority url is not valid"),

    DEVELOPER_AUTHORITY_IS_EMPTY("Authority is empty"),

    DEVELOPER_ASYNC_TASK_REUSED(
            "Async tasks can only be executed one time. They are not supposed to be reused."),

    DEVELOPER_RESOURCE_IS_EMPTY("Resource is empty"),

    DEVELOPER_CONTEXT_IS_NOT_PROVIDED("Context is not provided"),

    DEVELOPER_BEARER_HEADER_MULTIPLE_ITEMS(
            "Key/value pair list contains redundant items in the header"),

    CALLBACK_IS_NOT_FOUND("Active callback is not found"),

    DEVELOPER_ACTIVITY_IS_NOT_RESOLVED("Activity is not resolved"),

    DEVELOPER_INTERNET_PERMISSION_MISSING(
            "android.permission.INTERNET is not added to AndroidManifest file"),

    DEVELOPER_CALLING_ON_MAIN_THREAD("Calling from main thread for background operation"),

    SERVER_INVALID_REQUEST("Invalid request to server"),

    SERVER_ERROR("Server returned an error"),

    IO_EXCEPTION("I/O exception"),

    ARGUMENT_EXCEPTION("Invalid argument"),

    /**
     * webview has ssl related error and returned error code for that.
     */
    ERROR_FAILED_SSL_HANDSHAKE("Webview returned error for SSL"),

    /**
     * webview has some generic error
     */
    ERROR_WEBVIEW("Webview returned an error"),

    ACTIVITY_REQUEST_INTENT_DATA_IS_NULL("Request object is needed to start AuthenticationActivity"),

    BROADCAST_RECEIVER_ERROR("Broadcast receiver has an error"),

    AUTH_FAILED("Authorization failed"),

    AUTH_REFRESH_FAILED_PROMPT_NOT_ALLOWED("Refresh token is failed and prompt is not allowed"),

    AUTH_FAILED_SERVER_ERROR("The Authorization Server returned an unrecognized response"),

    AUTH_FAILED_NO_RESOURCES("The required resource bundle could not be loaded"),

    AUTH_FAILED_NO_STATE("The authorization server response has incorrectly encoded state"),

    AUTH_FAILED_BAD_STATE("The authorization server response has no encoded state"),

    AUTH_FAILED_NO_TOKEN("The requested access token could not be found"),

    AUTH_FAILED_CANCELLED("The user cancelled the authorization request"),

    AUTH_FAILED_INTERNAL_ERROR("Invalid parameters for authorization operation"),

    AUTH_FAILED_USER_MISMATCH("User's login hint is different than returned user info"),

    DEVICE_INTERNET_IS_NOT_AVAILABLE("Internet permissions are not set for the app"),

    /**
     * onActivityResult is called with null intent data. Activity may be
     * terminated directly<commit_msg>update error msg for user mismatch<commit_after>// Copyright  Microsoft Open Technologies, Inc.
//
// All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
// OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
// ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A
// PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
//
// See the Apache License, Version 2.0 for the specific language
// governing permissions and limitations under the License.

package com.microsoft.adal;

/**
 * Error codes
 */
public enum ADALError {

    DEVELOPER_AUTHORITY_CAN_NOT_BE_VALIDED("Authority validation returned an error"),

    DEVELOPER_AUTHORITY_IS_NOT_VALID_INSTANCE("Authority is not a valid instance"),

    DEVELOPER_AUTHORITY_IS_NOT_VALID_URL("Authority url is not valid"),

    DEVELOPER_AUTHORITY_IS_EMPTY("Authority is empty"),

    DEVELOPER_ASYNC_TASK_REUSED(
            "Async tasks can only be executed one time. They are not supposed to be reused."),

    DEVELOPER_RESOURCE_IS_EMPTY("Resource is empty"),

    DEVELOPER_CONTEXT_IS_NOT_PROVIDED("Context is not provided"),

    DEVELOPER_BEARER_HEADER_MULTIPLE_ITEMS(
            "Key/value pair list contains redundant items in the header"),

    CALLBACK_IS_NOT_FOUND("Active callback is not found"),

    DEVELOPER_ACTIVITY_IS_NOT_RESOLVED("Activity is not resolved"),

    DEVELOPER_INTERNET_PERMISSION_MISSING(
            "android.permission.INTERNET is not added to AndroidManifest file"),

    DEVELOPER_CALLING_ON_MAIN_THREAD("Calling from main thread for background operation"),

    SERVER_INVALID_REQUEST("Invalid request to server"),

    SERVER_ERROR("Server returned an error"),

    IO_EXCEPTION("I/O exception"),

    ARGUMENT_EXCEPTION("Invalid argument"),

    /**
     * webview has ssl related error and returned error code for that.
     */
    ERROR_FAILED_SSL_HANDSHAKE("Webview returned error for SSL"),

    /**
     * webview has some generic error
     */
    ERROR_WEBVIEW("Webview returned an error"),

    ACTIVITY_REQUEST_INTENT_DATA_IS_NULL("Request object is needed to start AuthenticationActivity"),

    BROADCAST_RECEIVER_ERROR("Broadcast receiver has an error"),

    AUTH_FAILED("Authorization failed"),

    AUTH_REFRESH_FAILED_PROMPT_NOT_ALLOWED("Refresh token is failed and prompt is not allowed"),

    AUTH_FAILED_SERVER_ERROR("The Authorization Server returned an unrecognized response"),

    AUTH_FAILED_NO_RESOURCES("The required resource bundle could not be loaded"),

    AUTH_FAILED_NO_STATE("The authorization server response has incorrectly encoded state"),

    AUTH_FAILED_BAD_STATE("The authorization server response has no encoded state"),

    AUTH_FAILED_NO_TOKEN("The requested access token could not be found"),

    AUTH_FAILED_CANCELLED("The user cancelled the authorization request"),

    AUTH_FAILED_INTERNAL_ERROR("Invalid parameters for authorization operation"),

    AUTH_FAILED_USER_MISMATCH("User returned by service does not match the one in the request"),

    DEVICE_INTERNET_IS_NOT_AVAILABLE("Internet permissions are not set for the app"),

    /**
     * onActivityResult is called with null intent data. Activity may be
     * terminated directly
{'fraction_non_alphanumeric': 0.0745064130278138, 'fraction_numerical': 0.0017293558149589277, 'mean_word_length': 4.318007662835249, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3388515', 'n_tokens_mistral': 1994, 'n_tokens_neox': 1873, 'n_words': 637}