Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 718122 Details for
Bug 918677
[as7] ASConnection becomes invalid and stale if security realm is reset or has a partition event resulting in loss of management and monitoring of AS7 resources
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
HttpDigest issue replication code (contributed by Thomas Segismont)
Test.java (text/x-java), 1.75 KB, created by
Simeon Pinder
on 2013-03-29 15:56:44 UTC
(
hide
)
Description:
HttpDigest issue replication code (contributed by Thomas Segismont)
Filename:
MIME Type:
Creator:
Simeon Pinder
Created:
2013-03-29 15:56:44 UTC
Size:
1.75 KB
patch
obsolete
>import java.util.Map; > >import org.apache.commons.httpclient.UsernamePasswordCredentials; >import org.apache.commons.httpclient.auth.AuthChallengeParser; >import org.apache.commons.httpclient.auth.AuthScheme; >import org.apache.commons.httpclient.auth.DigestScheme; >import org.apache.commons.httpclient.methods.GetMethod; >import org.apache.commons.httpclient.methods.PostMethod; > >/** > * Mostly extracted from > * http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java?view=co > */ >public class Test { > > public static void main(String[] args) throws Exception { > String challenge = "Digest realm=\"ManagementRealm\", nonce=\"6e30489bbf38f54fa6f1f37c8fe405cc\""; > UsernamePasswordCredentials cred = new UsernamePasswordCredentials("rhq", "rhqadmin"); > // HTTP method is a digest computation parameter. Update following line as needed > GetMethod method = new GetMethod("/management"); > AuthScheme authscheme = new DigestScheme(); > authscheme.processChallenge(challenge); > String response = authscheme.authenticate(cred, method); > Map table = AuthChallengeParser.extractParams(response); > assertEquals("rhq", table.get("username")); > assertEquals("ManagementRealm", table.get("realm")); > assertEquals("/management", table.get("uri")); > assertEquals("6e30489bbf38f54fa6f1f37c8fe405cc", table.get("nonce")); > assertEquals("1a844909bf9170e8fdcbc7323657b508", table.get("response")); > } > > private static void assertEquals(Object expected, Object actual) { > if (!expected.equals(actual)) { > throw new RuntimeException("Expected " + expected + " but got " + actual); > } > } > >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 918677
: 718122