Opened 14 years ago

Closed 9 years ago

#2278 closed enhancement (duplicate)

Add basic authentication support

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: IncludeMacro
Severity: normal Keywords: remote authentication
Cc: Trac Release: 0.10


Is there any way we could add basic authentication support into this include macro?

Would it involve adding code like this to it?

# create a password manager
password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm()

# Add the username and password.
# If we knew the realm, we could use it instead of ``None``.
top_level_url = ""
password_mgr.add_password(None, top_level_url, username, password)

handler = urllib2.HTTPBasicAuthHandler(password_mgr)

# create "opener" (OpenerDirector instance)
opener = urllib2.build_opener(handler)

# use the opener to fetch a URL

# Install the opener.
# Now all calls to urllib2.urlopen use our opener.

Attachments (0)

Change History (3)

comment:1 Changed 13 years ago by Ryan J Ollos

Summary: Basic authentication supportAdd basic authentication support

comment:2 Changed 9 years ago by Steffen Hoffmann

Keywords: remote authentication added
Owner: changed from Noah Kantrowitz to Ryan J Ollos

comment:3 Changed 9 years ago by Steffen Hoffmann

Resolution: duplicate
Status: newclosed

#6879 has been transformed into a duplicate of this ticket.

It's pointing to #4743, that holds some promising code for implementing the requested feature as well.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.