diff --git a/SoObjects/SOGo/SOGoCache.h b/SoObjects/SOGo/SOGoCache.h index 663c7934d..b1277937b 100644 --- a/SoObjects/SOGo/SOGoCache.h +++ b/SoObjects/SOGo/SOGoCache.h @@ -111,6 +111,11 @@ - (void) setCASPGTId: (NSString *) pgtId forPGTIOU: (NSString *) pgtIou; +// SAML2 support +- (NSDictionary *) saml2LoginDumpsForIdentifier: (NSString *) identifier; +- (void) setSaml2LoginDumps: (NSDictionary *) dump + forIdentifier: (NSString *) identifier; + // // ACL caching support // diff --git a/SoObjects/SOGo/SOGoCache.m b/SoObjects/SOGo/SOGoCache.m index 7ede34230..e815224e1 100644 --- a/SoObjects/SOGo/SOGoCache.m +++ b/SoObjects/SOGo/SOGoCache.m @@ -520,6 +520,27 @@ static memcached_st *handle = NULL; forKey: [NSString stringWithFormat: @"cas-pgtiou:%@", pgtIou]]; } +// SAML2 support +- (NSDictionary *) saml2LoginDumpsForIdentifier: (NSString *) identifier +{ + NSString *key, *jsonString; + + key = [NSString stringWithFormat: @"saml2-login:%@", identifier]; + jsonString = [self valueForKey: key]; + + return [jsonString objectFromJSONString]; +} + +- (void) setSaml2LoginDumps: (NSDictionary *) dump + forIdentifier: (NSString *) identifier +{ + NSString *key; + + key = [NSString stringWithFormat: @"saml2-login:%@", identifier]; + + [self setValue: [dump jsonRepresentation] forKey: key]; +} + // // ACL caching code //