blob: e584dcbda6406df1841516e0f1ecb85f1b56b7b1 [file] [log] [blame]
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_COMMON_CREDENTIAL_PROVIDER_ARCHIVABLE_CREDENTIAL_H_
#define IOS_CHROME_COMMON_CREDENTIAL_PROVIDER_ARCHIVABLE_CREDENTIAL_H_
#import <Foundation/Foundation.h>
#import "ios/chrome/common/credential_provider/credential.h"
// Credential that can be archived. `serviceIdentifier` must be unique between
// credentials, as it is used for equality.
//
// Credentials are immutable and don't hold state, and because of this the
// source of truth should always be the store.
@interface ArchivableCredential : NSObject <Credential, NSSecureCoding>
- (instancetype)initWithFavicon:(NSString*)favicon
keychainIdentifier:(NSString*)keychainIdentifier
rank:(int64_t)rank
recordIdentifier:(NSString*)recordIdentifier
serviceIdentifier:(NSString*)serviceIdentifier
serviceName:(NSString*)serviceName
user:(NSString*)user
validationIdentifier:(NSString*)validationIdentifier
NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
@end
#endif // IOS_CHROME_COMMON_CREDENTIAL_PROVIDER_ARCHIVABLE_CREDENTIAL_H_