1 /* 2 * Copyright 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package androidx.credentials 18 19 import androidx.annotation.RestrictTo 20 import androidx.annotation.StringDef 21 import androidx.credentials.ClearCredentialStateRequest.Companion.TYPE_CLEAR_CREDENTIAL_STATE 22 import androidx.credentials.ClearCredentialStateRequest.Companion.TYPE_CLEAR_RESTORE_CREDENTIAL 23 24 /** 25 * This allows verification when the user passes in the request type for their 26 * [ClearCredentialStateRequest]. 27 * 28 * If the request type is [TYPE_CLEAR_CREDENTIAL_STATE], then the request will be sent to the 29 * credential providers to clear the user's credential state. 30 * 31 * If the request type is [TYPE_CLEAR_RESTORE_CREDENTIAL], then the request will be sent to the 32 * restore credential provider to delete any stored [RestoreCredential]. 33 */ 34 @Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE) 35 @Retention(AnnotationRetention.SOURCE) 36 @StringDef(value = [TYPE_CLEAR_CREDENTIAL_STATE, TYPE_CLEAR_RESTORE_CREDENTIAL]) 37 @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) 38 annotation class ClearCredentialRequestTypes 39