public class Unauthenticated extends Error implements java.io.Serializable, com.vmware.vapi.bindings.StaticStructure
Unauthenticated
exception indicates that the method requires
authentication and the user is not authenticated.
API requests may include a security context containing user credentials. For example, the user credentials could be a SAML token, a user name and password, or the session identifier for a previously established session.
Examples:
Unauthorized
exception would be used instead. For security reasons, the Error.getData()
property in this exception is null
, and the Error.getMessages()
property in
this exception does not disclose which part of the security context is correct
or incorrect. For example the messages would not disclose whether a username or
a password is valid or invalid, but only that a combination of username and
password is invalid.
Modifier and Type | Class and Description |
---|---|
static class |
Unauthenticated.Builder
Builder class for
Unauthenticated . |
Error.Type
__dynamicStructureFields
Modifier | Constructor and Description |
---|---|
|
Unauthenticated()
Default constructor.
|
|
Unauthenticated(java.util.List<LocalizableMessage> messages,
com.vmware.vapi.bindings.Structure data)
This constructor is provided for backwards compatibility purposes only.
|
protected |
Unauthenticated(com.vmware.vapi.data.StructValue __dynamicStructureFields) |
protected |
Unauthenticated(com.vmware.vapi.data.StructValue __dynamicStructureFields,
Error.Type errorType) |
Modifier and Type | Method and Description |
---|---|
<T extends com.vmware.vapi.bindings.Structure> |
_convertTo(java.lang.Class<T> clazz) |
java.lang.String |
_getCanonicalName() |
static java.lang.String |
_getCanonicalTypeName()
Returns the canonical type name.
|
static com.vmware.vapi.bindings.type.ErrorType |
_getClassType()
WARNING: Internal method, subject to change in future versions.
|
com.vmware.vapi.data.StructValue |
_getDataValue() |
com.vmware.vapi.data.DataValue |
_getDynamicField(java.lang.String fieldName) |
java.util.Set<java.lang.String> |
_getDynamicFieldNames() |
com.vmware.vapi.bindings.type.ErrorType |
_getType() |
boolean |
_hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz) |
static Unauthenticated |
_newInstance(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Returns new instance of this binding class and injects the provided data value. WARNING: The returned object is not fully initialized. |
static Unauthenticated |
_newInstance2(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Serves as a versioning mechanism. |
void |
_setDynamicField(java.lang.String fieldName,
com.vmware.vapi.data.DataValue fieldValue) |
protected void |
_updateDataValue(com.vmware.vapi.data.StructValue structValue) |
void |
_validate() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getChallenge()
Indicates the authentication challenges applicable to the target API provider.
|
java.lang.String |
getMessage() |
int |
hashCode() |
void |
setChallenge(java.lang.String challenge)
Indicates the authentication challenges applicable to the target API provider.
|
getData, getErrorType, getMessages, setData, setMessages
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public Unauthenticated(java.util.List<LocalizableMessage> messages, com.vmware.vapi.bindings.Structure data)
public Unauthenticated()
protected Unauthenticated(com.vmware.vapi.data.StructValue __dynamicStructureFields)
protected Unauthenticated(com.vmware.vapi.data.StructValue __dynamicStructureFields, Error.Type errorType)
public java.lang.String getChallenge()
For example, a provider using REST may adhere to the WWW-Authenticate HTTP header specification, RFC7235, section 4.1. In this case an example challenge value may be: SIGN realm="27da1358-2ba4-11e9-b210-d663bd873d93",sts="http://vcenter/sso?vsphere.local", Basic realm="vCenter"
. This property was added in vSphere API 7.0.0.0. This property is optional because it was added in a newer version than its parent node.public void setChallenge(java.lang.String challenge)
For example, a provider using REST may adhere to the WWW-Authenticate HTTP header specification, RFC7235, section 4.1. In this case an example challenge value may be: SIGN realm="27da1358-2ba4-11e9-b210-d663bd873d93",sts="http://vcenter/sso?vsphere.local", Basic realm="vCenter"
. This property was added in vSphere API 7.0.0.0. This property is optional because it was added in a newer version than its parent node.challenge
- New value for the property.public com.vmware.vapi.bindings.type.ErrorType _getType()
public com.vmware.vapi.data.StructValue _getDataValue()
_getDataValue
in interface com.vmware.vapi.bindings.Structure
_getDataValue
in class Error
protected void _updateDataValue(com.vmware.vapi.data.StructValue structValue)
_updateDataValue
in class Error
public void _validate()
public java.lang.String getMessage()
getMessage
in class Error
public boolean _hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz)
_hasTypeNameOf
in interface com.vmware.vapi.bindings.Structure
_hasTypeNameOf
in class Error
public <T extends com.vmware.vapi.bindings.Structure> T _convertTo(java.lang.Class<T> clazz)
_convertTo
in interface com.vmware.vapi.bindings.Structure
_convertTo
in class Error
public void _setDynamicField(java.lang.String fieldName, com.vmware.vapi.data.DataValue fieldValue)
_setDynamicField
in interface com.vmware.vapi.bindings.StaticStructure
_setDynamicField
in class Error
public com.vmware.vapi.data.DataValue _getDynamicField(java.lang.String fieldName)
_getDynamicField
in interface com.vmware.vapi.bindings.StaticStructure
_getDynamicField
in class Error
public java.util.Set<java.lang.String> _getDynamicFieldNames()
_getDynamicFieldNames
in interface com.vmware.vapi.bindings.StaticStructure
_getDynamicFieldNames
in class Error
public static com.vmware.vapi.bindings.type.ErrorType _getClassType()
ErrorType
instance representing the static bindings
type for this Error
.public java.lang.String _getCanonicalName()
_getCanonicalName
in interface com.vmware.vapi.bindings.Structure
_getCanonicalName
in class Error
public static java.lang.String _getCanonicalTypeName()
_getCanonicalName()
.public static Unauthenticated _newInstance(com.vmware.vapi.data.StructValue structValue)
structValue
- the source of the data contained in the binding object. Could
contain more data than fields of this class can describe i.e.
newer version of the binding object. Could be null.StructType
public static Unauthenticated _newInstance2(com.vmware.vapi.data.StructValue structValue)