Skip to content
This repository
Browse code

Rename "BrowserID" --> "Persona"

Note that this invalidates all saved persistent replications that used Persona/BrowserID auth,
because the property in the replication doc was renamed too.
It also changes the server endpoint that the replicator hits to log in from /db/browserid to /db/persona.
Fixes #25.
  • Loading branch information...
commit 111859cb5efd8e330b9b1034678adeaa799c99ed 1 parent daab43d
Jens Alfke snej authored
24 CouchbaseLite.xcodeproj/project.pbxproj
@@ -157,10 +157,10 @@
157 157 2773ADC714BD1EB80027A292 /* CBLDatabase+LocalDocs.h in Headers */ = {isa = PBXBuildFile; fileRef = 2773ADC514BD1EB80027A292 /* CBLDatabase+LocalDocs.h */; settings = {ATTRIBUTES = (Private, ); }; };
158 158 2773ADC814BD1EB80027A292 /* CBLDatabase+LocalDocs.m in Sources */ = {isa = PBXBuildFile; fileRef = 2773ADC614BD1EB80027A292 /* CBLDatabase+LocalDocs.m */; };
159 159 2773ADC914BD1EB80027A292 /* CBLDatabase+LocalDocs.m in Sources */ = {isa = PBXBuildFile; fileRef = 2773ADC614BD1EB80027A292 /* CBLDatabase+LocalDocs.m */; };
160   - 2776A59116A0C3A6006FF199 /* CBLBrowserIDAuthorizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2776A58F16A0C3A6006FF199 /* CBLBrowserIDAuthorizer.h */; };
161   - 2776A59216A0C3A6006FF199 /* CBLBrowserIDAuthorizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2776A58F16A0C3A6006FF199 /* CBLBrowserIDAuthorizer.h */; };
162   - 2776A59316A0C3A6006FF199 /* CBLBrowserIDAuthorizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 2776A59016A0C3A6006FF199 /* CBLBrowserIDAuthorizer.m */; };
163   - 2776A59616A0C3B1006FF199 /* CBLBrowserIDAuthorizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 2776A59016A0C3A6006FF199 /* CBLBrowserIDAuthorizer.m */; };
  160 + 2776A59116A0C3A6006FF199 /* CBLPersonaAuthorizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2776A58F16A0C3A6006FF199 /* CBLPersonaAuthorizer.h */; };
  161 + 2776A59216A0C3A6006FF199 /* CBLPersonaAuthorizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2776A58F16A0C3A6006FF199 /* CBLPersonaAuthorizer.h */; };
  162 + 2776A59316A0C3A6006FF199 /* CBLPersonaAuthorizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 2776A59016A0C3A6006FF199 /* CBLPersonaAuthorizer.m */; };
  163 + 2776A59616A0C3B1006FF199 /* CBLPersonaAuthorizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 2776A59016A0C3A6006FF199 /* CBLPersonaAuthorizer.m */; };
164 164 2776A63016A9BCBC006FF199 /* CBL_DatabaseChange.h in Headers */ = {isa = PBXBuildFile; fileRef = 2776A62E16A9BCBC006FF199 /* CBL_DatabaseChange.h */; };
165 165 2776A63116A9BCBC006FF199 /* CBL_DatabaseChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 2776A62F16A9BCBC006FF199 /* CBL_DatabaseChange.m */; };
166 166 2776A63216A9BCBC006FF199 /* CBL_DatabaseChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 2776A62F16A9BCBC006FF199 /* CBL_DatabaseChange.m */; };
@@ -670,8 +670,8 @@
670 670 27731F3B14967A8400815D67 /* ConfigViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConfigViewController.xib; sourceTree = "<group>"; };
671 671 2773ADC514BD1EB80027A292 /* CBLDatabase+LocalDocs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CBLDatabase+LocalDocs.h"; sourceTree = "<group>"; };
672 672 2773ADC614BD1EB80027A292 /* CBLDatabase+LocalDocs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CBLDatabase+LocalDocs.m"; sourceTree = "<group>"; };
673   - 2776A58F16A0C3A6006FF199 /* CBLBrowserIDAuthorizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CBLBrowserIDAuthorizer.h; sourceTree = "<group>"; };
674   - 2776A59016A0C3A6006FF199 /* CBLBrowserIDAuthorizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CBLBrowserIDAuthorizer.m; sourceTree = "<group>"; };
  673 + 2776A58F16A0C3A6006FF199 /* CBLPersonaAuthorizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CBLPersonaAuthorizer.h; sourceTree = "<group>"; };
  674 + 2776A59016A0C3A6006FF199 /* CBLPersonaAuthorizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CBLPersonaAuthorizer.m; sourceTree = "<group>"; };
675 675 2776A62E16A9BCBC006FF199 /* CBL_DatabaseChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CBL_DatabaseChange.h; sourceTree = "<group>"; };
676 676 2776A62F16A9BCBC006FF199 /* CBL_DatabaseChange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CBL_DatabaseChange.m; sourceTree = "<group>"; };
677 677 27821BB5148E7D6F0099B373 /* CBL_Replicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CBL_Replicator.h; sourceTree = "<group>"; };
@@ -1221,8 +1221,8 @@
1221 1221 270F5704156AE0BF000FEB8F /* CBLAuthorizer.m */,
1222 1222 27F128AF156AC1C8008465C2 /* CBLOAuth1Authorizer.h */,
1223 1223 27F128B0156AC1C9008465C2 /* CBLOAuth1Authorizer.m */,
1224   - 2776A58F16A0C3A6006FF199 /* CBLBrowserIDAuthorizer.h */,
1225   - 2776A59016A0C3A6006FF199 /* CBLBrowserIDAuthorizer.m */,
  1224 + 2776A58F16A0C3A6006FF199 /* CBLPersonaAuthorizer.h */,
  1225 + 2776A59016A0C3A6006FF199 /* CBLPersonaAuthorizer.m */,
1226 1226 );
1227 1227 name = Auth;
1228 1228 sourceTree = "<group>";
@@ -1673,7 +1673,7 @@
1673 1673 27846FBC15D475DF0030122F /* MYStreamUtils.h in Headers */,
1674 1674 270D6FC1164484190081812D /* CBLSocketChangeTracker.h in Headers */,
1675 1675 275A29021649A11900B0D8EE /* CouchbaseLitePrivate.h in Headers */,
1676   - 2776A59116A0C3A6006FF199 /* CBLBrowserIDAuthorizer.h in Headers */,
  1676 + 2776A59116A0C3A6006FF199 /* CBLPersonaAuthorizer.h in Headers */,
1677 1677 2776A63016A9BCBC006FF199 /* CBL_DatabaseChange.h in Headers */,
1678 1678 271C2AD416FA176300B8C9DB /* CBL_Shared.h in Headers */,
1679 1679 );
@@ -1726,7 +1726,7 @@
1726 1726 275A29051649A13900B0D8EE /* CBLReplication.h in Headers */,
1727 1727 27F5B18716519F2400126D0D /* CBLUITableSource.h in Headers */,
1728 1728 27F5B18916519F8F00126D0D /* MYDynamicObject.h in Headers */,
1729   - 2776A59216A0C3A6006FF199 /* CBLBrowserIDAuthorizer.h in Headers */,
  1729 + 2776A59216A0C3A6006FF199 /* CBLPersonaAuthorizer.h in Headers */,
1730 1730 275A24E016B986CD00561DF0 /* CBLJSON.h in Headers */,
1731 1731 );
1732 1732 runOnlyForDeploymentPostprocessing = 0;
@@ -2165,7 +2165,7 @@
2165 2165 27846FBD15D475DF0030122F /* MYStreamUtils.m in Sources */,
2166 2166 270D6FC2164484190081812D /* CBLSocketChangeTracker.m in Sources */,
2167 2167 27B15517164A118100DF5E2C /* CBL_Database_Tests.m in Sources */,
2168   - 2776A59316A0C3A6006FF199 /* CBLBrowserIDAuthorizer.m in Sources */,
  2168 + 2776A59316A0C3A6006FF199 /* CBLPersonaAuthorizer.m in Sources */,
2169 2169 2776A63116A9BCBC006FF199 /* CBL_DatabaseChange.m in Sources */,
2170 2170 271C2AD516FA176300B8C9DB /* CBL_Shared.m in Sources */,
2171 2171 );
@@ -2287,7 +2287,7 @@
2287 2287 27DA435215918C0200F9E7B5 /* MYDynamicObject.m in Sources */,
2288 2288 27846FBB15D475DF0030122F /* MYRegexUtils.m in Sources */,
2289 2289 27846FBE15D475DF0030122F /* MYStreamUtils.m in Sources */,
2290   - 2776A59616A0C3B1006FF199 /* CBLBrowserIDAuthorizer.m in Sources */,
  2290 + 2776A59616A0C3B1006FF199 /* CBLPersonaAuthorizer.m in Sources */,
2291 2291 2776A63216A9BCBC006FF199 /* CBL_DatabaseChange.m in Sources */,
2292 2292 271C2AD616FA176300B8C9DB /* CBL_Shared.m in Sources */,
2293 2293 );
10 Source/API/CBLManager.m
@@ -16,7 +16,7 @@
16 16 #import "CBL_ReplicatorManager.h"
17 17 #import "CBL_Server.h"
18 18 #import "CBL_URLProtocol.h"
19   -#import "CBLBrowserIDAuthorizer.h"
  19 +#import "CBLPersonaAuthorizer.h"
20 20 #import "CBLOAuth1Authorizer.h"
21 21 #import "CBL_Shared.h"
22 22 #import "CBLInternal.h"
@@ -470,10 +470,10 @@ - (CBLStatus) parseReplicatorProperties: (NSDictionary*)properties
470 470 tokenSecret: tokenSec
471 471 signatureMethod: sigMethod];
472 472 } else {
473   - NSDictionary* browserid = $castIf(NSDictionary, auth[@"browserid"]);
474   - if (browserid) {
475   - NSString* email = $castIf(NSString, browserid[@"email"]);
476   - *outAuthorizer = [[CBLBrowserIDAuthorizer alloc] initWithEmailAddress: email];
  473 + NSDictionary* persona = $castIf(NSDictionary, auth[@"persona"]);
  474 + if (persona) {
  475 + NSString* email = $castIf(NSString, persona[@"email"]);
  476 + *outAuthorizer = [[CBLPersonaAuthorizer alloc] initWithEmailAddress: email];
477 477 }
478 478 }
479 479 if (!*outAuthorizer)
18 Source/API/CBLReplication.h
@@ -76,23 +76,23 @@ typedef enum {
76 76 and optionally "signature_method". */
77 77 @property (nonatomic, copy) NSDictionary* OAuth;
78 78
79   -/** The base URL of the remote server, for use as the "origin" parameter when requesting BrowserID authentication. */
80   -@property (readonly) NSURL* browserIDOrigin;
  79 +/** The base URL of the remote server, for use as the "origin" parameter when requesting Persona authentication. */
  80 +@property (readonly) NSURL* personaOrigin;
81 81
82   -/** Email address for remote login with BrowserID (aka Persona). This is stored persistently in
  82 +/** Email address for remote login with Persona (aka BrowserID). This is stored persistently in
83 83 the replication document, but it's not sufficient for login (you also need to go through the
84   - BrowserID protocol to get a signed assertion, which you then pass to the
85   - -registerBrowserIDAssertion: method.)*/
86   -@property (nonatomic, copy) NSString* browserIDEmailAddress;
  84 + Persona protocol to get a signed assertion, which you then pass to the
  85 + -registerPersonaAssertion: method.)*/
  86 +@property (nonatomic, copy) NSString* personaEmailAddress;
87 87
88   -/** Registers a BrowserID 'assertion' (ID verification) string that will be used on the next login to the remote server. This also sets browserIDEmailAddress.
  88 +/** Registers a Persona 'assertion' (ID verification) string that will be used on the next login to the remote server. This also sets personaEmailAddress.
89 89 Note: An assertion is a type of certificate and typically has a very short lifespan (like, a
90 90 few minutes.) For this reason it's not stored in the replication document, but instead kept
91   - in an in-memory registry private to the BrowserID authorizer. You should initiate a replication
  91 + in an in-memory registry private to the Persona authorizer. You should initiate a replication
92 92 immediately after registering the assertion, so that the replicator engine can use it to
93 93 authenticate before it expires. After that, the replicator will have a login session cookie
94 94 that should last significantly longer before needing to be renewed. */
95   -- (bool) registerBrowserIDAssertion: (NSString*)assertion __attribute__((nonnull));
  95 +- (bool) registerPersonaAssertion: (NSString*)assertion __attribute__((nonnull));
96 96
97 97
98 98 #pragma mark - STATUS:
22 Source/API/CBLReplication.m
@@ -13,7 +13,7 @@
13 13 #import "CBLDatabase+Replication.h"
14 14 #import "CBLManager+Internal.h"
15 15 #import "CBL_Server.h"
16   -#import "CBLBrowserIDAuthorizer.h"
  16 +#import "CBLPersonaAuthorizer.h"
17 17 #import "MYBlockUtils.h"
18 18 #import "MYURLUtils.h"
19 19
@@ -251,29 +251,29 @@ - (void) setOAuth: (NSDictionary*)oauth {
251 251 [self setRemoteDictionaryValue: auth forKey: @"auth"];
252 252 }
253 253
254   -- (NSURL*) browserIDOrigin {
255   - return [CBLBrowserIDAuthorizer originForSite: self.remoteURL];
  254 +- (NSURL*) personaOrigin {
  255 + return [CBLPersonaAuthorizer originForSite: self.remoteURL];
256 256 }
257 257
258   -- (NSString*) browserIDEmailAddress {
  258 +- (NSString*) personaEmailAddress {
259 259 NSDictionary* auth = $castIf(NSDictionary, (self.remoteDictionary)[@"auth"]);
260   - return auth[@"browserid"][@"email"];
  260 + return auth[@"persona"][@"email"];
261 261 }
262 262
263   -- (void) setBrowserIDEmailAddress:(NSString *)email {
  263 +- (void) setPersonaEmailAddress:(NSString *)email {
264 264 NSDictionary* auth = nil;
265 265 if (email)
266   - auth = @{@"browserid": @{@"email": email}};
  266 + auth = @{@"persona": @{@"email": email}};
267 267 [self setRemoteDictionaryValue: auth forKey: @"auth"];
268 268 }
269 269
270   -- (bool) registerBrowserIDAssertion: (NSString*)assertion {
271   - NSString* email = [CBLBrowserIDAuthorizer registerAssertion: assertion];
  270 +- (bool) registerPersonaAssertion: (NSString*)assertion {
  271 + NSString* email = [CBLPersonaAuthorizer registerAssertion: assertion];
272 272 if (!email) {
273   - Warn(@"Invalid BrowserID assertion: %@", assertion);
  273 + Warn(@"Invalid Persona assertion: %@", assertion);
274 274 return false;
275 275 }
276   - self.browserIDEmailAddress = email;
  276 + self.personaEmailAddress = email;
277 277 [self restart];
278 278 return true;
279 279 }
5 Source/CBLBrowserIDAuthorizer.h → Source/CBLPersonaAuthorizer.h
... ... @@ -1,5 +1,5 @@
1 1 //
2   -// CBLBrowserIDAuthorizer.h
  2 +// CBLPersonaAuthorizer.h
3 3 // CouchbaseLite
4 4 //
5 5 // Created by Jens Alfke on 1/9/13.
@@ -8,7 +8,8 @@
8 8
9 9 #import "CBLAuthorizer.h"
10 10
11   -@interface CBLBrowserIDAuthorizer: NSObject <CBLAuthorizer>
  11 +/** Authorizer for the Persona decentralized-identity system. See http://persona.org */
  12 +@interface CBLPersonaAuthorizer: NSObject <CBLAuthorizer>
12 13
13 14 + (NSURL*) originForSite: (NSURL*)url;
14 15
16 Source/CBLBrowserIDAuthorizer.m → Source/CBLPersonaAuthorizer.m
... ... @@ -1,18 +1,18 @@
1 1 //
2   -// CBLBrowserIDAuthorizer.m
  2 +// CBLPersonaAuthorizer.m
3 3 // CouchbaseLite
4 4 //
5 5 // Created by Jens Alfke on 1/9/13.
6 6 //
7 7 //
8 8
9   -#import "CBLBrowserIDAuthorizer.h"
  9 +#import "CBLPersonaAuthorizer.h"
10 10 #import "CBLBase64.h"
11 11
12 12 static NSMutableDictionary* sAssertions;
13 13
14 14
15   -@implementation CBLBrowserIDAuthorizer
  15 +@implementation CBLPersonaAuthorizer
16 16
17 17
18 18 static NSDictionary* decodeComponent(NSArray* components, NSUInteger index) {
@@ -126,7 +126,7 @@ - (NSString*) authorizeHTTPMessage: (CFHTTPMessageRef)message
126 126
127 127
128 128 - (NSString*) loginPathForSite:(NSURL *)site {
129   - return [site.path stringByAppendingPathComponent: @"_browserid"];
  129 + return [site.path stringByAppendingPathComponent: @"_persona"];
130 130 }
131 131
132 132
@@ -140,7 +140,7 @@ - (NSDictionary*) loginParametersForSite: (NSURL*)site {
140 140
141 141
142 142
143   -TestCase(TEBrowserIDAuthorizer) {
  143 +TestCase(TEPersonaAuthorizer) {
144 144 NSString* email, *origin;
145 145 NSDate* exp;
146 146 CAssert(!parseAssertion(@"", &email, &origin, &exp));
@@ -154,13 +154,13 @@ - (NSDictionary*) loginParametersForSite: (NSURL*)site {
154 154
155 155 // Register and retrieve the sample assertion:
156 156 NSURL* originURL = [NSURL URLWithString: origin];
157   - CAssertEqual([CBLBrowserIDAuthorizer registerAssertion: sampleAssertion], email);
158   - NSString* gotAssertion = [CBLBrowserIDAuthorizer takeAssertionForEmailAddress: email
  157 + CAssertEqual([CBLPersonaAuthorizer registerAssertion: sampleAssertion], email);
  158 + NSString* gotAssertion = [CBLPersonaAuthorizer takeAssertionForEmailAddress: email
159 159 site: originURL];
160 160 CAssertEqual(gotAssertion, sampleAssertion);
161 161
162 162 // -assertionForSite: should return nil because the assertion has expired by now:
163   - CBLBrowserIDAuthorizer* auth = [[CBLBrowserIDAuthorizer alloc] initWithEmailAddress: email];
  163 + CBLPersonaAuthorizer* auth = [[CBLPersonaAuthorizer alloc] initWithEmailAddress: email];
164 164 CAssertEqual(auth.emailAddress, email);
165 165 CAssertEqual([auth assertionForSite: originURL], nil);
166 166 }
2  Source/CBLRouter_Tests.m
@@ -129,7 +129,7 @@ static void CheckCacheable(CBLManager* server, NSString* path) {
129 129 // This is an assertion generated by persona.org on 1/13/2013.
130 130 NSString* sampleAssertion = @"eyJhbGciOiJSUzI1NiJ9.eyJwdWJsaWMta2V5Ijp7ImFsZ29yaXRobSI6IkRTIiwieSI6ImNhNWJiYTYzZmI4MDQ2OGE0MjFjZjgxYTIzN2VlMDcwYTJlOTM4NTY0ODhiYTYzNTM0ZTU4NzJjZjllMGUwMDk0ZWQ2NDBlOGNhYmEwMjNkYjc5ODU3YjkxMzBlZGNmZGZiNmJiNTUwMWNjNTk3MTI1Y2NiMWQ1ZWQzOTVjZTMyNThlYjEwN2FjZTM1ODRiOWIwN2I4MWU5MDQ4NzhhYzBhMjFlOWZkYmRjYzNhNzNjOTg3MDAwYjk4YWUwMmZmMDQ4ODFiZDNiOTBmNzllYzVlNDU1YzliZjM3NzFkYjEzMTcxYjNkMTA2ZjM1ZDQyZmZmZjQ2ZWZiZDcwNjgyNWQiLCJwIjoiZmY2MDA0ODNkYjZhYmZjNWI0NWVhYjc4NTk0YjM1MzNkNTUwZDlmMWJmMmE5OTJhN2E4ZGFhNmRjMzRmODA0NWFkNGU2ZTBjNDI5ZDMzNGVlZWFhZWZkN2UyM2Q0ODEwYmUwMGU0Y2MxNDkyY2JhMzI1YmE4MWZmMmQ1YTViMzA1YThkMTdlYjNiZjRhMDZhMzQ5ZDM5MmUwMGQzMjk3NDRhNTE3OTM4MDM0NGU4MmExOGM0NzkzMzQzOGY4OTFlMjJhZWVmODEyZDY5YzhmNzVlMzI2Y2I3MGVhMDAwYzNmNzc2ZGZkYmQ2MDQ2MzhjMmVmNzE3ZmMyNmQwMmUxNyIsInEiOiJlMjFlMDRmOTExZDFlZDc5OTEwMDhlY2FhYjNiZjc3NTk4NDMwOWMzIiwiZyI6ImM1MmE0YTBmZjNiN2U2MWZkZjE4NjdjZTg0MTM4MzY5YTYxNTRmNGFmYTkyOTY2ZTNjODI3ZTI1Y2ZhNmNmNTA4YjkwZTVkZTQxOWUxMzM3ZTA3YTJlOWUyYTNjZDVkZWE3MDRkMTc1ZjhlYmY2YWYzOTdkNjllMTEwYjk2YWZiMTdjN2EwMzI1OTMyOWU0ODI5YjBkMDNiYmM3ODk2YjE1YjRhZGU1M2UxMzA4NThjYzM0ZDk2MjY5YWE4OTA0MWY0MDkxMzZjNzI0MmEzODg5NWM5ZDViY2NhZDRmMzg5YWYxZDdhNGJkMTM5OGJkMDcyZGZmYTg5NjIzMzM5N2EifSwicHJpbmNpcGFsIjp7ImVtYWlsIjoiamVuc0Btb29zZXlhcmQuY29tIn0sImlhdCI6MTM1ODI5NjIzNzU3NywiZXhwIjoxMzU4MzgyNjM3NTc3LCJpc3MiOiJsb2dpbi5wZXJzb25hLm9yZyJ9.RnDK118nqL2wzpLCVRzw1MI4IThgeWpul9jPl6ypyyxRMMTurlJbjFfs-BXoPaOem878G8-4D2eGWS6wd307k7xlPysevYPogfFWxK_eDHwkTq3Ts91qEDqrdV_JtgULC8c1LvX65E0TwW_GL_TM94g3CvqoQnGVxxoaMVye4ggvR7eOZjimWMzUuu4Lo9Z-VBHBj7XM0UMBie57CpGwH4_Wkv0V_LHZRRHKdnl9ISp_aGwfBObTcHG9v0P3BW9vRrCjihIn0SqOJQ9obl52rMf84GD4Lcy9NIktzfyka70xR9Sh7ALotW7rWywsTzMTu3t8AzMz2MJgGjvQmx49QA~eyJhbGciOiJEUzEyOCJ9.eyJleHAiOjEzNTgyOTY0Mzg0OTUsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6NDk4NC8ifQ.4FV2TrUQffDya0MOxOQlzJQbDNvCPF2sfTIJN7KOLvvlSFPknuIo5g";
131 131
132   - NSDictionary* asserted = SendBody(server, @"POST", @"/_browserid_assertion", $dict({@"assertion", sampleAssertion}), kCBLStatusOK, nil);
  132 + NSDictionary* asserted = SendBody(server, @"POST", @"/_persona_assertion", $dict({@"assertion", sampleAssertion}), kCBLStatusOK, nil);
133 133 CAssert(asserted[@"ok"]);
134 134 CAssertEqual(asserted[@"email"], @"jens@mooseyard.com");
135 135
6 Source/CBL_Router+Handlers.m
@@ -26,7 +26,7 @@
26 26 #import "CBL_Revision.h"
27 27 #import "CBL_DatabaseChange.h"
28 28 #import "CBL_Server.h"
29   -#import "CBLBrowserIDAuthorizer.h"
  29 +#import "CBLPersonaAuthorizer.h"
30 30 #import "CBL_Replicator.h"
31 31 #import "CBL_ReplicatorManager.h"
32 32 #import "CBL_Pusher.h"
@@ -85,9 +85,9 @@ - (CBLStatus) do_POST_replicate {
85 85 return kCBLStatusOK;
86 86 }
87 87
88   -- (CBLStatus) do_POST_browserid_assertion {
  88 +- (CBLStatus) do_POST_persona_assertion {
89 89 NSDictionary* body = self.bodyAsDictionary;
90   - NSString* email = [CBLBrowserIDAuthorizer registerAssertion: body[@"assertion"]];
  90 + NSString* email = [CBLPersonaAuthorizer registerAssertion: body[@"assertion"]];
91 91 if (email != nil) {
92 92 _response.bodyObject = $dict({@"ok", @"registered"}, {@"email", email});
93 93 return kCBLStatusOK;
2  Source/CouchbaseLite.exp
@@ -28,7 +28,7 @@ _kCBLDocumentChangeNotification
28 28 .objc_class_name_CBL_Replicator
29 29 .objc_class_name_CBL_Pusher
30 30 .objc_class_name_CBL_Puller
31   -.objc_class_name_CBLBrowserIDAuthorizer
  31 +.objc_class_name_CBLPersonaAuthorizer
32 32
33 33 .objc_class_name_CBL_Server
34 34 .objc_class_name_CBLMultipartDocumentReader

0 comments on commit 111859c

Please sign in to comment.
Something went wrong with that request. Please try again.