Fix in inbox. You specify the credentials to be used for a url and all new
instances of MCHttpRepository will use those credentials. For example:
registry := MCServerRegistry uniqueInstance.
registry on: self exampleServerUrl beUser: 'myusername' withPassword:
'mypassword'.
repo := MCHttpRepository location: self exampleServerUrl.
repo user = 'myusername'.
repo password = 'mypassword'.
Full details:
* Add MCServerRegistry, a singleton which stores credentials for
MCHttpRepository locations (see #on:beUser:withPassword:)
* Add MCHttpRepository class>>location:, which uses any stored credentials,
or empty user and password if none
-Change all senders manually setting empty credentials to use #location.
e.g.
MCHttpRepository
location: 'http://ss3.gemstone.com/ss/Pharo20'
user: ''
password: ''
or worse
MCHttpRepository new
location: self inboxRepositoryUrlString;
user: '';
password: ''
becomes:
MCHttpRepository location: 'http://ss3.gemstone.com/ss/Pharo20'.
* Fix Gofer repo authentication
- Replace switch statement with polymorphic delegation
- Setting credentials only effects the repo for that Gofer instance;
does
not change the stored credentials
* Tests - added for new behavior, fixed relevant existing; all passing
* MCHttpRepository class>>location:user:password: only effects that repo;
does not change the stored credentials
--
View this message in context:
http://forum.world.st/ENH-MCHttpRepository-Authentication-Issue-6449-tp4641393p4645380.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.