summaryrefslogtreecommitdiff
path: root/src/goaidentity/goakerberosidentity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/goaidentity/goakerberosidentity.c')
-rw-r--r--src/goaidentity/goakerberosidentity.c42
1 files changed, 6 insertions, 36 deletions
diff --git a/src/goaidentity/goakerberosidentity.c b/src/goaidentity/goakerberosidentity.c
index b5cbcec..20add72 100644
--- a/src/goaidentity/goakerberosidentity.c
+++ b/src/goaidentity/goakerberosidentity.c
@@ -1780,7 +1780,6 @@ done:
void
goa_kerberos_identity_refresh (GoaKerberosIdentity *self)
{
- VerificationLevel old_verification_level, new_verification_level;
g_autofree char *preauth_identity_source = NULL;
g_autoptr (GError) error = NULL;
@@ -1788,11 +1787,13 @@ goa_kerberos_identity_refresh (GoaKerberosIdentity *self)
self->identifier,
self->active_credentials_cache_name);
- G_LOCK (identity_lock);
- old_verification_level = self->cached_verification_level;
- G_UNLOCK (identity_lock);
+ verify_identity (self, &preauth_identity_source, &error);
- new_verification_level = verify_identity (self, &preauth_identity_source, &error);
+ if (error != NULL)
+ {
+ g_debug ("GoaKerberosIdentity: Could not verify identity %s: %s", self->identifier, error->message);
+ return;
+ }
G_LOCK (identity_lock);
if (g_strcmp0 (self->preauth_identity_source, preauth_identity_source) != 0)
@@ -1801,37 +1802,6 @@ goa_kerberos_identity_refresh (GoaKerberosIdentity *self)
self->preauth_identity_source = g_steal_pointer (&preauth_identity_source);
}
G_UNLOCK (identity_lock);
-
- if (new_verification_level != old_verification_level)
- {
- if ((old_verification_level == VERIFICATION_LEVEL_SIGNED_IN) &&
- new_verification_level == VERIFICATION_LEVEL_EXISTS)
- {
- G_LOCK (identity_lock);
- self->cached_verification_level = new_verification_level;
- G_UNLOCK (identity_lock);
-
- g_signal_emit (G_OBJECT (self), signals[EXPIRED], 0);
- }
- else if (old_verification_level == VERIFICATION_LEVEL_EXISTS &&
- new_verification_level == VERIFICATION_LEVEL_SIGNED_IN)
- {
- G_LOCK (identity_lock);
- self->cached_verification_level = new_verification_level;
- G_UNLOCK (identity_lock);
-
- g_signal_emit (G_OBJECT (self), signals[UNEXPIRED], 0);
- }
- else
- {
- G_LOCK (identity_lock);
- self->cached_verification_level = new_verification_level;
- G_UNLOCK (identity_lock);
- }
- G_LOCK (identity_lock);
- queue_notify (self, &self->is_signed_in_idle_id, "is-signed-in");
- G_UNLOCK (identity_lock);
- }
}
gboolean