FRAIdentity.h revision 415243fbc81341293a852ff6aa14e9608d08685c
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2016 ForgeRock AS.
*/
/*!
* Identity is responsible for modelling the information that makes up part of a user's identity in
* the context of logging into that user's account.
*/
/*!
* Name of the Identity Provider (IdP) that issued this identity.
*/
/*!
* Name of this identity.
*/
/*!
* URL pointing to an image (such as a logo) that represents the issuer of this identity.
*/
/*!
* The Mechanisms assigned to the Identity. Maybe empty.
*/
#pragma mark -
/*!
* Prevent external use of super class' initWithDatabase: method.
*/
/*!
* Creates a new identity object with the provided property values.
*/
- (instancetype)initWithDatabase:(FRAIdentityDatabase *)database accountName:(NSString *)accountName issuer:(NSString *)issuer image:(NSURL *)image;
/*!
* Creates a new identity object with the provided property values.
*/
+ (instancetype)identityWithDatabase:(FRAIdentityDatabase *)database accountName:(NSString *)accountName issuer:(NSString *)issuer image:(NSURL *)image;
#pragma mark -
/*!
* Returns mechanism of the specified type if one has been registered to this identity.
*
* @param aClass The type of mechanism to look for.
* @return The mechanism object, or nil if no such mechanism has been registered.
*/
/*!
* When a new Mechanism is created, it will assigned to the Identity via
* this call.
*
* @param mechanism The new mechanism to add to this identity.
*/
/*!
* Removes the Mechanism, only if it was assigned to this Identity.
*
* @param mechanism The mechanism to remove from the identity.
*/
@end