private ActionResult CompleteSignIn(OpenIdentity identity) { if (identity == null || string.IsNullOrEmpty(identity.Username)) { return ErrorOut("Invalid Identifier"); } _formsService.SignIn(identity.Username, true); return Redirect(); }
public OpenIdentity Verify() { var oid = new OpenIdentity(); switch (_response.Status) { case AuthenticationStatus.Authenticated: oid.Id = _response.ClaimedIdentifier; oid.Username = _response.FriendlyIdentifierForDisplay; break; case AuthenticationStatus.Canceled: throw new ApplicationException("Canceled at Provider"); case AuthenticationStatus.Failed: throw new ApplicationException(_response.Exception.Message); } return oid; }
public OpenIdentity Verify() { var oid = new OpenIdentity(); switch (_response.Status) { case AuthenticationStatus.Authenticated: oid.Id = _response.ClaimedIdentifier; oid.Username = _response.FriendlyIdentifierForDisplay; break; case AuthenticationStatus.Canceled: throw new ApplicationException("Canceled at Provider"); case AuthenticationStatus.Failed: throw new ApplicationException(_response.Exception.Message); } return(oid); }