Mostly formatting changes.
This commit is contained in:
parent
79e2f829f4
commit
0983950115
@ -46,7 +46,8 @@ import org.xml.sax.helpers.XMLReaderFactory;
|
|||||||
* </auth_req>
|
* </auth_req>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AuthReqMsg {
|
public class AuthReqMsg
|
||||||
|
{
|
||||||
|
|
||||||
protected String m_realm = null;
|
protected String m_realm = null;
|
||||||
protected String m_authMechToken = null;
|
protected String m_authMechToken = null;
|
||||||
@ -100,7 +101,8 @@ public class AuthReqMsg {
|
|||||||
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_START:
|
case AWAITING_ROOT_ELEMENT_START:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -156,7 +158,8 @@ public class AuthReqMsg {
|
|||||||
public void endElement (String uri, String name, String qName) throws SAXException
|
public void endElement (String uri, String name, String qName) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_END:
|
case AWAITING_ROOT_ELEMENT_END:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -212,7 +215,8 @@ public class AuthReqMsg {
|
|||||||
public void characters (char ch[], int start, int length) throws SAXException
|
public void characters (char ch[], int start, int length) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_REALM_DATA:
|
case AWAITING_REALM_DATA:
|
||||||
// Consume the data
|
// Consume the data
|
||||||
|
@ -49,7 +49,8 @@ package com.novell.casa.authtoksvc;
|
|||||||
* in the HTTP 1.1 Specification.
|
* in the HTTP 1.1 Specification.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AuthRespMsg {
|
public class AuthRespMsg
|
||||||
|
{
|
||||||
|
|
||||||
String m_msg;
|
String m_msg;
|
||||||
|
|
||||||
|
@ -47,7 +47,8 @@ import org.xml.sax.helpers.XMLReaderFactory;
|
|||||||
* </auth_token>
|
* </auth_token>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AuthToken {
|
public class AuthToken
|
||||||
|
{
|
||||||
|
|
||||||
private String m_token;
|
private String m_token;
|
||||||
private String m_lifetime;
|
private String m_lifetime;
|
||||||
@ -110,7 +111,8 @@ public class AuthToken {
|
|||||||
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_START:
|
case AWAITING_ROOT_ELEMENT_START:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -195,7 +197,8 @@ public class AuthToken {
|
|||||||
public void endElement (String uri, String name, String qName) throws SAXException
|
public void endElement (String uri, String name, String qName) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_END:
|
case AWAITING_ROOT_ELEMENT_END:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -279,7 +282,8 @@ public class AuthToken {
|
|||||||
public void characters (char ch[], int start, int length) throws SAXException
|
public void characters (char ch[], int start, int length) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_SIGNATURE_DATA:
|
case AWAITING_SIGNATURE_DATA:
|
||||||
// Consume the data
|
// Consume the data
|
||||||
|
@ -159,7 +159,8 @@ public class CasaIdentityToken implements IdentityToken
|
|||||||
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_START:
|
case AWAITING_ROOT_ELEMENT_START:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -280,7 +281,8 @@ public class CasaIdentityToken implements IdentityToken
|
|||||||
public void endElement (String uri, String name, String qName) throws SAXException
|
public void endElement (String uri, String name, String qName) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_END:
|
case AWAITING_ROOT_ELEMENT_END:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -397,7 +399,8 @@ public class CasaIdentityToken implements IdentityToken
|
|||||||
public void characters (char ch[], int start, int length) throws SAXException
|
public void characters (char ch[], int start, int length) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ID_DATA:
|
case AWAITING_ID_DATA:
|
||||||
// Consume the data
|
// Consume the data
|
||||||
|
@ -39,8 +39,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
* service.
|
* service.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GetAuthPolicy extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
|
public class GetAuthPolicy extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = -8264027868130334613L;
|
private static final long serialVersionUID = -8264027868130334613L;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -133,5 +133,4 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
String s = sb.toString();
|
String s = sb.toString();
|
||||||
return s.getBytes();
|
return s.getBytes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -45,7 +45,8 @@ import org.xml.sax.helpers.XMLReaderFactory;
|
|||||||
* </get_auth_policy_req>
|
* </get_auth_policy_req>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GetAuthPolicyReqMsg {
|
public class GetAuthPolicyReqMsg
|
||||||
|
{
|
||||||
|
|
||||||
protected String m_serviceName = null;
|
protected String m_serviceName = null;
|
||||||
protected String m_hostName = null;
|
protected String m_hostName = null;
|
||||||
@ -99,7 +100,8 @@ public class GetAuthPolicyReqMsg {
|
|||||||
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_START:
|
case AWAITING_ROOT_ELEMENT_START:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -156,7 +158,8 @@ public class GetAuthPolicyReqMsg {
|
|||||||
public void endElement (String uri, String name, String qName) throws SAXException
|
public void endElement (String uri, String name, String qName) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_END:
|
case AWAITING_ROOT_ELEMENT_END:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -212,7 +215,8 @@ public class GetAuthPolicyReqMsg {
|
|||||||
public void characters (char ch[], int start, int length) throws SAXException
|
public void characters (char ch[], int start, int length) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_SERVICE_DATA:
|
case AWAITING_SERVICE_DATA:
|
||||||
// Consume the data
|
// Consume the data
|
||||||
|
@ -50,7 +50,8 @@ package com.novell.casa.authtoksvc;
|
|||||||
* in the HTTP 1.1 Specification.
|
* in the HTTP 1.1 Specification.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GetAuthPolicyRespMsg {
|
public class GetAuthPolicyRespMsg
|
||||||
|
{
|
||||||
|
|
||||||
String m_msg;
|
String m_msg;
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ import org.xml.sax.helpers.XMLReaderFactory;
|
|||||||
* </get_auth_token_req>
|
* </get_auth_token_req>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GetAuthTokReqMsg {
|
public class GetAuthTokReqMsg
|
||||||
|
{
|
||||||
|
|
||||||
protected String m_serviceName = null;
|
protected String m_serviceName = null;
|
||||||
protected String m_hostName = null;
|
protected String m_hostName = null;
|
||||||
@ -104,7 +105,8 @@ public class GetAuthTokReqMsg {
|
|||||||
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_START:
|
case AWAITING_ROOT_ELEMENT_START:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -175,7 +177,8 @@ public class GetAuthTokReqMsg {
|
|||||||
public void endElement (String uri, String name, String qName) throws SAXException
|
public void endElement (String uri, String name, String qName) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_END:
|
case AWAITING_ROOT_ELEMENT_END:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -245,7 +248,8 @@ public class GetAuthTokReqMsg {
|
|||||||
public void characters (char ch[], int start, int length) throws SAXException
|
public void characters (char ch[], int start, int length) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_SERVICE_DATA:
|
case AWAITING_SERVICE_DATA:
|
||||||
// Consume the data
|
// Consume the data
|
||||||
|
@ -50,7 +50,8 @@ package com.novell.casa.authtoksvc;
|
|||||||
* in the HTTP 1.1 Specification.
|
* in the HTTP 1.1 Specification.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GetAuthTokRespMsg {
|
public class GetAuthTokRespMsg
|
||||||
|
{
|
||||||
|
|
||||||
String m_msg;
|
String m_msg;
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
* to a particular service.
|
* to a particular service.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GetAuthToken extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
|
public class GetAuthToken extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = -5792862615065914894L;
|
private static final long serialVersionUID = -5792862615065914894L;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -29,7 +29,8 @@ package com.novell.casa.authtoksvc;
|
|||||||
*
|
*
|
||||||
* This is the interface to Identity Token Providers.
|
* This is the interface to Identity Token Providers.
|
||||||
*/
|
*/
|
||||||
public interface IdentityToken {
|
public interface IdentityToken
|
||||||
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the token with parameters.
|
* Initialize the token with parameters.
|
||||||
|
@ -57,8 +57,8 @@ import org.bandit.ia.IAContext;
|
|||||||
* This class processes authentication requests utilizing a kerberos-V token.
|
* This class processes authentication requests utilizing a kerberos-V token.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Krb5Authenticate extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
|
public class Krb5Authenticate extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 7247746330553668339L;
|
private static final long serialVersionUID = 7247746330553668339L;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -111,7 +111,7 @@ import org.bandit.ia.IAContext;
|
|||||||
// Clean up
|
// Clean up
|
||||||
context.dispose();
|
context.dispose();
|
||||||
}
|
}
|
||||||
catch(GSSException e)
|
catch (GSSException e)
|
||||||
{
|
{
|
||||||
System.err.println("Krb5Authenticate Krb5Token()- GSS Exception caught: " + e.getLocalizedMessage());
|
System.err.println("Krb5Authenticate Krb5Token()- GSS Exception caught: " + e.getLocalizedMessage());
|
||||||
throw new Exception("Authentication Failure");
|
throw new Exception("Authentication Failure");
|
||||||
@ -157,7 +157,7 @@ import org.bandit.ia.IAContext;
|
|||||||
m_krb5,
|
m_krb5,
|
||||||
GSSCredential.ACCEPT_ONLY);
|
GSSCredential.ACCEPT_ONLY);
|
||||||
}
|
}
|
||||||
catch(GSSException e)
|
catch (GSSException e)
|
||||||
{
|
{
|
||||||
System.err.println("Krb5Authenticate()- GSS Exception caught: " + e.getLocalizedMessage());
|
System.err.println("Krb5Authenticate()- GSS Exception caught: " + e.getLocalizedMessage());
|
||||||
throw new Exception("Failed to instantiate needed GSS objects");
|
throw new Exception("Failed to instantiate needed GSS objects");
|
||||||
|
@ -31,7 +31,8 @@ package com.novell.casa.authtoksvc;
|
|||||||
* protocol.
|
* protocol.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ProtoDefs {
|
public class ProtoDefs
|
||||||
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XML Declaration used in the Casa Client/Server protocol
|
* XML Declaration used in the Casa Client/Server protocol
|
||||||
|
@ -55,8 +55,8 @@ import org.bandit.ia.IAContext;
|
|||||||
* password materials.
|
* password materials.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PwdAuthenticate extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
|
public class PwdAuthenticate extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final long serialVersionUID = 3710685782114934264L;
|
private static final long serialVersionUID = 3710685782114934264L;
|
||||||
|
|
||||||
|
@ -48,7 +48,8 @@ import org.xml.sax.helpers.XMLReaderFactory;
|
|||||||
* </session_token>
|
* </session_token>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SessionToken {
|
public class SessionToken
|
||||||
|
{
|
||||||
|
|
||||||
private String m_id;
|
private String m_id;
|
||||||
private String m_realm;
|
private String m_realm;
|
||||||
@ -111,7 +112,8 @@ public class SessionToken {
|
|||||||
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
public void startElement (String uri, String name, String qName, org.xml.sax.Attributes atts) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_START:
|
case AWAITING_ROOT_ELEMENT_START:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -196,7 +198,8 @@ public class SessionToken {
|
|||||||
public void endElement (String uri, String name, String qName) throws SAXException
|
public void endElement (String uri, String name, String qName) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_ROOT_ELEMENT_END:
|
case AWAITING_ROOT_ELEMENT_END:
|
||||||
// Verify that we are processing the expected tag
|
// Verify that we are processing the expected tag
|
||||||
@ -280,7 +283,8 @@ public class SessionToken {
|
|||||||
public void characters (char ch[], int start, int length) throws SAXException
|
public void characters (char ch[], int start, int length) throws SAXException
|
||||||
{
|
{
|
||||||
// Proceed based on our state
|
// Proceed based on our state
|
||||||
switch (m_state) {
|
switch (m_state)
|
||||||
|
{
|
||||||
|
|
||||||
case AWAITING_SIGNATURE_DATA:
|
case AWAITING_SIGNATURE_DATA:
|
||||||
// Consume the data
|
// Consume the data
|
||||||
|
Loading…
Reference in New Issue
Block a user