239 { |
239 { |
240 userName.Set(iIdentityProvider->UserName()); |
240 userName.Set(iIdentityProvider->UserName()); |
241 password.Set(iIdentityProvider->Password()); |
241 password.Set(iIdentityProvider->Password()); |
242 } |
242 } |
243 HBufC8* created(NULL); |
243 HBufC8* created(NULL); |
244 CWSOviSessionContext* sessioncontext = iWSOviServiceSession->SessionContext(); |
244 //CWSOviSessionContext* sessioncontext = iWSOviServiceSession->SessionContext(); |
245 const TInt* diffHandlerContext = iHndCtx->GetIntL(HandlerContextKey::KDiff); |
245 const TInt* diffHandlerContext = iHndCtx->GetIntL(HandlerContextKey::KDiff); |
246 if( diffHandlerContext && *diffHandlerContext > 0 ) |
246 if( diffHandlerContext && *diffHandlerContext > 0 ) |
247 { |
247 { |
248 TTimeIntervalMinutes minutes(*diffHandlerContext); |
248 TTimeIntervalMinutes minutes(*diffHandlerContext); |
249 TTime diff = time - minutes; |
249 TTime diff = time - minutes; |
401 if ( pConsumer && !pConsumer->HasAuthenticationCallback() && |
401 if ( pConsumer && !pConsumer->HasAuthenticationCallback() && |
402 retryCounter < 3 ) |
402 retryCounter < 3 ) |
403 { |
403 { |
404 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::ValidateL - Consumer does not have AuthenticationCallback"); |
404 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::ValidateL - Consumer does not have AuthenticationCallback"); |
405 |
405 |
406 const TDesC8* pValue = iIdentityProvider->AsElement().AttrValue( KSenAttrPromptUserInfo ); |
406 const TDesC8* pValue = iIdentityProvider->AsElement().AttrValue( KSenAttrPromptUserInfo ); |
407 |
407 /* #ifdef _RD_SEN_WS_STAR_DO_NOT_PROMPT_AUTHINFO_BY_DEFAULT */ // For OVI no Notifier Plugin is popped up |
408 #ifdef _RD_SEN_WS_STAR_DO_NOT_PROMPT_AUTHINFO_BY_DEFAULT |
|
409 if ( pValue && *pValue != _L8("false") ) |
408 if ( pValue && *pValue != _L8("false") ) |
410 // attribute has to exist, otherwise logic defaults to: DO NOT PROMPT |
409 // attribute has to exist, otherwise logic defaults to: DO NOT PROMPT |
411 #else |
410 //#else |
412 if ( !pValue || *pValue != _L8("false") ) |
411 // if ( !pValue || *pValue != _L8("false") ) |
413 // even when attribute does NOT exist, or when it does and has any other value but "false", default to: PROMPT |
412 // even when attribute does NOT exist, or when it does and has any other value but "false", default to: PROMPT |
414 #endif |
413 //#endif |
415 { |
414 { |
416 const TBool* renewingPtr = NAUTHSsnContext->GetIntL(WSOviContextKeys::KReAuthNeeded); |
415 const TBool* renewingPtr = NAUTHSsnContext->GetIntL(WSOviContextKeys::KReAuthNeeded); |
417 if ( renewingPtr && *renewingPtr ) |
416 if ( renewingPtr && *renewingPtr ) |
418 { |
417 { |
419 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KNormalLogLevel,"- Prompt is used to get AuthenticationInfo"); |
418 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KNormalLogLevel,"- Prompt is used to get AuthenticationInfo"); |
420 TInt ret = (Framework().Manager()).AuthenticationForL(*iIdentityProvider, |
419 TInt ret = (Framework().Manager()).AuthenticationForL(*iIdentityProvider, |
421 authInfo); |
420 authInfo); |
422 if ( ret == KErrNone ) |
421 if ( ret == KErrNone ) |
423 { |
422 { |
424 retryCounter++; |
423 retryCounter++; |
425 retry = ETrue; |
424 retry = ETrue; |
426 authenticationInfoPromptedFromUser = ETrue; |
425 authenticationInfoPromptedFromUser = ETrue; |
427 } |
426 } |
428 } |
427 } |
429 } |
428 } |
430 else |
429 else |
431 { |
430 { |
432 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KNormalLogLevel,"CWSOviOAuthClient::ValidateL - promptUserInfo = false"); |
431 //Special Case handled for OVI Frameworks |
|
432 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KNormalLogLevel,"------- Notifier plugin will not be used for OVI What about UI Less SignIn !!!"); |
433 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KNormalLogLevel," => prompt is not used."); |
433 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KNormalLogLevel," => prompt is not used."); |
434 } |
434 } |
435 } |
435 } |
436 if ( pConsumer && pConsumer->HasAuthenticationCallback() && |
436 if ( pConsumer && pConsumer->HasAuthenticationCallback() && |
437 retryCounter < 3 ) |
437 retryCounter < 3 ) |