added methods for supporting SAML2 persistence

pull/7/head
Wolfgang Sourdeau 2012-11-02 15:29:02 -04:00
parent efb39b401a
commit 6840fbb96c
2 changed files with 26 additions and 0 deletions

View File

@ -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
//

View File

@ -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
//