FRANotification.m revision a1e92b2783be4bfeb0c7e267223cc7779a6f324c
0N/A * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
0N/A * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
0N/A- (instancetype)initWithDatabase:(FRAIdentityDatabase *)database messageId:(NSString *)messageId challenge:(NSString *)challenge timeReceived:(NSDate *)timeReceived timeToLive:(NSTimeInterval)timeToLive {
0N/A+ (instancetype)notificationWithDatabase:(FRAIdentityDatabase *)database messageId:(NSString *)messageId challenge:(NSString *)challenge timeReceived:(NSDate *)timeReceived timeToLive:(NSTimeInterval)timeToLive {
0N/A return [[FRANotification alloc] initWithDatabase:database messageId:messageId challenge:challenge timeReceived:timeReceived timeToLive:timeToLive];
0N/A return [NSString stringWithFormat:@"%ld minutes ago", (long)((age/ONE_MINUTE_IN_SECONDS)+0.5)];
0N/A // TODO: Make this check more accurate, if it's 9am Tuesday then 2 days ago in seconds was 9am Sunday
0N/A NSDictionary *data = @{@"response":[FRAMessageUtils generateChallengeResponse:_challenge secret:mechanism.secret]};