当前位置: 首页>>代码示例>>Java>>正文


Java Status类代码示例

本文整理汇总了Java中org.opensaml.saml2.core.Status的典型用法代码示例。如果您正苦于以下问题:Java Status类的具体用法?Java Status怎么用?Java Status使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Status类属于org.opensaml.saml2.core包,在下文中一共展示了Status类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processChildElement

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
        throws UnmarshallingException {
    ArtifactResponse artifactResponse = (ArtifactResponse) parentSAMLObject;

    if (childSAMLObject instanceof Issuer) {
        artifactResponse.setIssuer((Issuer) childSAMLObject);
    } else if (childSAMLObject instanceof Signature) {
        artifactResponse.setSignature((Signature) childSAMLObject);
    } else if (childSAMLObject instanceof Extensions) {
        artifactResponse.setExtensions((Extensions) childSAMLObject);
    } else if (childSAMLObject instanceof Status) {
        artifactResponse.setStatus((Status) childSAMLObject);
    } else {
        artifactResponse.setMessage((SAMLObject) childSAMLObject);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:ArtifactResponseUnmarshaller.java

示例2: processChildElement

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
        throws UnmarshallingException {
    StatusResponseType sr = (StatusResponseType) parentSAMLObject;

    if (childSAMLObject instanceof Issuer) {
        sr.setIssuer((Issuer) childSAMLObject);
    } else if (childSAMLObject instanceof Signature) {
        sr.setSignature((Signature) childSAMLObject);
    } else if (childSAMLObject instanceof Extensions) {
        sr.setExtensions((Extensions) childSAMLObject);
    } else if (childSAMLObject instanceof Status) {
        sr.setStatus((Status) childSAMLObject);
    } else {
        super.processChildElement(parentSAMLObject, childSAMLObject);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:StatusResponseTypeUnmarshaller.java

示例3: buildStatus

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
private Status buildStatus(String status, String statMsg) {

        Status stat = new StatusBuilder().buildObject();

        // Set the status code.
        StatusCode statCode = new StatusCodeBuilder().buildObject();
        statCode.setValue(status);
        stat.setStatusCode(statCode);

        // Set the status Message.
        if (statMsg != null) {
            StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
            statMesssage.setMessage(statMsg);
            stat.setStatusMessage(statMesssage);
        }

        return stat;
    }
 
开发者ID:wso2-extensions,项目名称:identity-agent-sso,代码行数:19,代码来源:SAML2SSOManager.java

示例4: buildStatus

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
private Status buildStatus(String status, String statMsg) {

        Status stat = new StatusBuilder().buildObject();

        // Set the status code
        StatusCode statCode = new StatusCodeBuilder().buildObject();
        statCode.setValue(status);
        stat.setStatusCode(statCode);

        // Set the status Message
        if (statMsg != null) {
            StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
            statMesssage.setMessage(statMsg);
            stat.setStatusMessage(statMesssage);
        }

        return stat;
    }
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:19,代码来源:DefaultResponseBuilder.java

示例5: buildResponse

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
/**
 * Build the error response
 *
 * @param inResponseToID
 * @param statusCodes
 * @param statusMsg
 * @return
 */
public Response buildResponse(String inResponseToID, List<String> statusCodes, String statusMsg,
                              String destination) throws IdentityException {
    if (statusCodes == null || statusCodes.isEmpty()) {
        throw IdentityException.error("No Status Values");
    }
    response.setIssuer(SAMLSSOUtil.getIssuer());
    Status status = new StatusBuilder().buildObject();
    StatusCode statusCode = null;
    for (String statCode : statusCodes) {
        statusCode = buildStatusCode(statCode, statusCode);
    }
    status.setStatusCode(statusCode);
    buildStatusMsg(status, statusMsg);
    response.setStatus(status);
    response.setVersion(SAMLVersion.VERSION_20);
    response.setID(SAMLSSOUtil.createID());
    if (inResponseToID != null) {
        response.setInResponseTo(inResponseToID);
    }
    if (destination != null) {
        response.setDestination(destination);
    }
    response.setIssueInstant(new DateTime());
    return response;
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:34,代码来源:ErrorResponseBuilder.java

示例6: buildStatus

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
private Status buildStatus(String status, String statMsg) {

        Status stat = new StatusBuilder().buildObject();

        //Set the status code
        StatusCode statCode = new StatusCodeBuilder().buildObject();
        statCode.setValue(status);
        stat.setStatusCode(statCode);

        //Set the status Message
        if (statMsg != null) {
            StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
            statMesssage.setMessage(statMsg);
            stat.setStatusMessage(statMesssage);
        }

        return stat;
    }
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:19,代码来源:SingleLogoutMessageBuilder.java

示例7: buildStatus

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
/**
 * Get status
 *
 * @param status
 * @param statMsg
 * @return Status object
 */
private Status buildStatus(String status, String statMsg) {

    Status stat = new StatusBuilder().buildObject();

    // Set the status code
    StatusCode statCode = new StatusCodeBuilder().buildObject();
    statCode.setValue(status);
    stat.setStatusCode(statCode);

    // Set the status Message
    if (statMsg != null) {
        StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
        statMesssage.setMessage(statMsg);
        stat.setStatusMessage(statMesssage);
    }

    return stat;
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:26,代码来源:SAMLResponseBuilder.java

示例8: setUp

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
/** {@inheritDoc} */
protected void setUp() throws Exception {
    super.setUp();
    expectedID = "def456";
    expectedInResponseTo = "abc123";
    expectedSAMLVersion = SAMLVersion.VERSION_20;
    expectedIssueInstant = new DateTime(2006, 2, 21, 16, 40, 0, 0, ISOChronology.getInstanceUTC());
    expectedDestination = "http://sp.example.org/endpoint";
    expectedConsent = "urn:string:consent";
    
    QName issuerQName = new QName(SAMLConstants.SAML20_NS, Issuer.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
    expectedIssuer = (Issuer) buildXMLObject(issuerQName);
    
    QName statusQName = new QName(SAMLConstants.SAML20P_NS, Status.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX);
    expectedStatus = (Status) buildXMLObject(statusQName);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:17,代码来源:StatusResponseTestBase.java

示例9: processChildElement

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
        throws UnmarshallingException {
    Status status = (Status) parentSAMLObject;

    if (childSAMLObject instanceof StatusCode) {
        status.setStatusCode((StatusCode) childSAMLObject);
    } else if (childSAMLObject instanceof StatusMessage) {
        status.setStatusMessage((StatusMessage) childSAMLObject);
    } else if (childSAMLObject instanceof StatusDetail) {
        status.setStatusDetail((StatusDetail) childSAMLObject);
    } else {
        super.processChildElement(parentSAMLObject, childSAMLObject);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:StatusUnmarshaller.java

示例10: createLogoutResponse

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private LogoutResponse createLogoutResponse(String id, 
                                    String code, String msg) {
    
  // Consume LogoutResponse
  LogoutResponse lresp = ((SAMLObjectBuilder<LogoutResponse>) 
            _bf.getBuilder(LogoutResponse.DEFAULT_ELEMENT_NAME)).
                                                          buildObject();
  String uid = UUID.randomUUID().toString();
  
  lresp.setID(uid);
  lresp.setInResponseTo(id);
  lresp.setIssueInstant(new DateTime());
  lresp.setVersion(SAMLVersion.VERSION_20);
  lresp.setIssuer(getIssuer());
  
  // Set status code
  Status status = ((SAMLObjectBuilder<Status>) _bf.getBuilder(
              Status.DEFAULT_ELEMENT_NAME)).buildObject();
  
  StatusCode scode = ((SAMLObjectBuilder<StatusCode>) _bf.getBuilder(
              StatusCode.DEFAULT_ELEMENT_NAME)).buildObject();
  scode.setValue(code);
  status.setStatusCode(scode);
  
  if (!msg.equals("")) {
    StatusMessage smsg = ((SAMLObjectBuilder<StatusMessage>) _bf.getBuilder(
                          StatusMessage.DEFAULT_ELEMENT_NAME)).buildObject();
    smsg.setMessage(msg);
    status.setStatusMessage(smsg);
  }
  
  lresp.setStatus(status);
  
  return lresp;
}
 
开发者ID:osbitools,项目名称:OsBiToolsWs,代码行数:37,代码来源:SamlSecurityProvider.java

示例11: testCreateStatus

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
@Test
public void testCreateStatus() {
	Status s = SAMLUtil.createStatus("status");
	assertNotNull(s);
	assertNull(s.getStatusDetail());
	assertNull(s.getStatusMessage());
	assertNotNull(s.getStatusCode());
	
	assertEquals("status", s.getStatusCode().getValue());
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:11,代码来源:SAMLUtilTest.java

示例12: buildStatus

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
/**
 * Build a SAML Status object
 *
 * @param pStatusCode Code the the SAML Status Object
 * @return SAML Status object
 */
private Status buildStatus(String pStatusCode) {
  Status lStatus = new StatusBuilder().buildObject();

  // Set the status code
  StatusCode lStatusCode = new StatusCodeBuilder().buildObject();
  lStatusCode.setValue(pStatusCode);
  lStatus.setStatusCode(lStatusCode);

  return lStatus;
}
 
开发者ID:Fivium,项目名称:FOXopen,代码行数:17,代码来源:SAMLResponseCommand.java

示例13: buildStatusMsg

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
/**
 * Set the StatusMessage for Status of Response
 *
 * @param statusMsg
 * @return
 */
private Status buildStatusMsg(Status status, String statusMsg) {
    if (statusMsg != null) {
        StatusMessage statusMesssage = new StatusMessageBuilder().buildObject();
        statusMesssage.setMessage(statusMsg);
        status.setStatusMessage(statusMesssage);
    }
    return status;
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:15,代码来源:ErrorResponseBuilder.java

示例14: buildStatus

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
private static Status buildStatus() {

        Status stat = new StatusBuilder().buildObject();

        //Set the status code
        StatusCode statCode = new StatusCodeBuilder().buildObject();
        statCode.setValue("urn:oasis:names:tc:SAML:2.0:status:Responder");
        stat.setStatusCode(statCode);
        StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
        statMesssage.setMessage("Error when processing the Authentication Request");
        stat.setStatusMessage(statMesssage);

        return stat;
    }
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:15,代码来源:ErrorResponseBuilder.java

示例15: populateRequiredData

import org.opensaml.saml2.core.Status; //导入依赖的package包/类
/** {@inheritDoc} */
protected void populateRequiredData() {
    super.populateRequiredData();
    Status status = (Status) target;
    StatusCode code = (StatusCode) buildXMLObject(new QName(SAMLConstants.SAML20P_NS, StatusCode.DEFAULT_ELEMENT_LOCAL_NAME));
    status.setStatusCode(code);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:8,代码来源:StatusSchemaTest.java


注:本文中的org.opensaml.saml2.core.Status类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。