Differences From Artifact [efe19df829]:
- File src/XMPPExceptions.m — part of check-in [0d872572ac] at 2011-02-18 00:56:41 on branch trunk — Perform IDNA's ToASCII operation on the server's domain name (user: florob@babelmonkeys.de, size: 4575) [annotate] [blame] [check-ins using]
To Artifact [60f59f8f6f]:
- File
src/XMPPExceptions.m
— part of check-in
[6a3b0a9988]
at
2011-02-21 03:09:39
on branch trunk
— Add SCRAM-SHA-1 support
This adds the new base class XMPPAuthenticator and the derived
classes XMPPSCRAMAuth and XMPPPLAINAuth.
They are now used for authentication from within XMPPConnection.Also adds XMPPAuthFailedException which is thrown in appropriate places. (user: florob@babelmonkeys.de, size: 5635) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
203 204 205 206 207 208 209 210 211 212 213 | return description; pool = [[OFAutoreleasePool alloc] init]; description = [[OFString alloc] initWithFormat: @"IDNA operation %@ failed on string '%@'!", operation, string]; [pool release]; return description; } @end | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | return description; pool = [[OFAutoreleasePool alloc] init]; description = [[OFString alloc] initWithFormat: @"IDNA operation %@ failed on string '%@'!", operation, string]; [pool release]; return description; } @end @implementation XMPPAuthFailedException @synthesize reason; + newWithClass: (Class)class_ connection: (XMPPConnection*)conn reason: (OFString*)reason_; { return [[self alloc] initWithClass: class_ connection: conn reason: reason_]; } - initWithClass: (Class)class_ connection: (XMPPConnection*)conn { Class c = isa; [self release]; @throw [OFNotImplementedException newWithClass: c selector: _cmd]; } - initWithClass: (Class)class_ connection: (XMPPConnection*)conn reason: (OFString*)reason_ { self = [super initWithClass: class_ connection: conn]; @try { reason = [reason_ copy]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [reason release]; [super dealloc]; } - (OFString*)description { OFAutoreleasePool *pool; if (description != nil) return description; pool = [[OFAutoreleasePool alloc] init]; description = [[OFString alloc] initWithFormat: @"Authentication failed. Reason: %@!", reason]; [pool release]; return description; } @end |