com.sun.xml.ws.security.trust.impl.wssx.elements.RequestSecurityTokenResponseImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webservices-osgi Show documentation
Show all versions of webservices-osgi Show documentation
Metro Web Services Runtime OSGi Bundle
/*
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* $Id: RequestSecurityTokenResponseImpl.java,v 1.2 2010-10-21 15:37:05 snajper Exp $
*/
package com.sun.xml.ws.security.trust.impl.wssx.elements;
import java.util.List;
import java.util.Map;
import java.net.URI;
import com.sun.xml.ws.policy.impl.bindings.AppliesTo;
import com.sun.xml.ws.policy.Policy;
import com.sun.xml.ws.policy.impl.bindings.PolicyReference;
import jakarta.xml.bind.JAXBElement;
import javax.xml.namespace.QName;
import com.sun.xml.ws.api.security.trust.Status;
import com.sun.xml.ws.api.security.trust.WSTrustException;
import com.sun.xml.ws.security.trust.WSTrustVersion;
import com.sun.xml.ws.security.trust.elements.*;
import com.sun.xml.ws.security.trust.elements.Entropy;
import com.sun.xml.ws.security.trust.elements.Lifetime;
import com.sun.xml.ws.security.trust.elements.RequestSecurityTokenResponse;
import com.sun.xml.ws.security.trust.impl.wssx.WSTrustVersion13;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.AllowPostdatingType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.AuthenticatorType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.BinaryExchangeType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.DelegateToType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.EncryptionType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestSecurityTokenResponseType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.EntropyType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.LifetimeType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestedReferenceType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestedProofTokenType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestedSecurityTokenType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestedTokenCancelledType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.ObjectFactory;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.ProofEncryptionType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.RenewingType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.SignChallengeType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.StatusType;
import com.sun.xml.ws.security.trust.impl.wssx.bindings.UseKeyType;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.sun.xml.ws.security.trust.logging.LogDomainConstants;
import com.sun.xml.ws.security.trust.logging.LogStringsMessages;
/**
* Implementation of a RequestSecurityTokenResponse.
*
* @author Manveen Kaur
*/
public class RequestSecurityTokenResponseImpl extends RequestSecurityTokenResponseType implements RequestSecurityTokenResponse {
private static final Logger log =
Logger.getLogger(
LogDomainConstants.TRUST_IMPL_DOMAIN,
LogDomainConstants.TRUST_IMPL_DOMAIN_BUNDLE);
private URI tokenType = null;
private long keySize = 0;
private URI keyType = null;
private URI computedKeyAlgorithm = null;
private URI signatureAlgorithm = null;
private URI encryptionAlgorithm = null;
private URI canonAlgorithm = null;
private Lifetime lifetime = null;
private Entropy entropy = null;
private AppliesTo appliesTo = null;
private Authenticator authenticator = null;
private UseKey useKey = null;
private ProofEncryption proofEncryption = null;
private Encryption encryption = null;
private DelegateTo delegateTo = null;
private OnBehalfOf obo = null;
private RequestedSecurityToken requestedSecToken = null;
private RequestedProofToken requestedProofToken = null;
private RequestedAttachedReference requestedAttachedReference = null;
private RequestedUnattachedReference requestedUnattachedReference = null;
private URI signWith = null;
private URI encryptWith = null;
private URI keyWrapAlgorithm = null;
private URI authenticationType = null;
private SignChallenge signChallenge = null;
private SignChallengeResponse signChallengeRes = null;
private boolean forwardable = true;
private boolean delegatable = false;
private Issuer issuer = null;
private Renewing renewable = null;
private BinaryExchange binaryExchange = null;
private AllowPostdating apd = null;
private Status status = null;
private Policy policy = null;
private PolicyReference policyRef = null;
private RequestedTokenCancelled rtc = null;
public RequestSecurityTokenResponseImpl() {
// default empty constructor
}
public RequestSecurityTokenResponseImpl(URI tokenType,
URI context,
RequestedSecurityToken token,
AppliesTo scopes,
RequestedAttachedReference attached,
RequestedUnattachedReference unattached,
RequestedProofToken proofToken,
Entropy entropy,
Lifetime lifetime,
Status status) {
setTokenType(tokenType);
if (context != null) setContext(context.toString());
if (token != null) setRequestedSecurityToken(token);
if (attached!= null) setRequestedAttachedReference(attached);
if (unattached!= null) setRequestedUnattachedReference(unattached);
if (scopes != null) setAppliesTo(scopes);
if (proofToken != null) setRequestedProofToken(proofToken);
if (entropy != null) setEntropy(entropy);
if (lifetime != null) setLifetime(lifetime);
if (status != null) setStatus(status);
}
public URI getTokenType() {
return tokenType;
}
public void setTokenType(URI tokenType) {
if (tokenType != null) {
this.tokenType = tokenType;
JAXBElement ttElement =
(new ObjectFactory()).createTokenType(tokenType.toString());
getAny().add(ttElement);
}
}
public Map getOtherAttributes() {
return super.getOtherAttributes();
}
public Lifetime getLifetime() {
return lifetime;
}
public void setLifetime(Lifetime lifetime) {
this.lifetime = lifetime;
JAXBElement ltElement =
(new ObjectFactory()).createLifetime((LifetimeType)lifetime);
getAny().add(ltElement);
}
public RequestedTokenCancelled getRequestedTokenCancelled() {
return this.rtc;
}
public void setRequestedTokenCancelled(RequestedTokenCancelled rtc) {
this.rtc = rtc;
JAXBElement rtcElement =
(new ObjectFactory()).createRequestedTokenCancelled((RequestedTokenCancelledType)rtc);
getAny().add(rtcElement);
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
JAXBElement sElement =
(new ObjectFactory()).createStatus((StatusType)status);
getAny().add(sElement);
}
public Entropy getEntropy() {
return entropy;
}
public void setEntropy(Entropy entropy) {
this.entropy = entropy;
JAXBElement etElement =
(new ObjectFactory()).createEntropy((EntropyType)entropy);
getAny().add(etElement);
}
public List