Message Security Layer (MSL)

com.netflix.msl.entityauth
Class X509AuthenticationData

java.lang.Object
  extended by com.netflix.msl.entityauth.EntityAuthenticationData
      extended by com.netflix.msl.entityauth.X509AuthenticationData

public class X509AuthenticationData
extends EntityAuthenticationData

X.509 asymmetric keys entity authentication data.

The X.509 certificate should be used to enumerate any entity properties. The certificate subject canonical name is considered the device identity. X.509 authentication data is considered equal based on the device identity.

{ "#mandatory" : [ "x509certificate" ], "x509certificate" : "base64" } where:


Field Summary
private  String identity
          Entity identity.
private static String KEY_X509_CERT
          JSON key entity X.509 certificate.
private  X509Certificate x509cert
          Entity X.509 certificate.
 
Constructor Summary
X509AuthenticationData(JSONObject x509AuthJO)
          Construct a new X.509 asymmetric keys authentication data instance from the provided JSON object.
X509AuthenticationData(X509Certificate x509cert)
          Construct a new X.509 asymmetric keys authentication data instance from the provided X.509 certificate.
 
Method Summary
 boolean equals(Object obj)
           
 JSONObject getAuthData()
           
 String getIdentity()
           
 X509Certificate getX509Cert()
           
 int hashCode()
           
 
Methods inherited from class com.netflix.msl.entityauth.EntityAuthenticationData
create, getScheme, toJSONString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_X509_CERT

private static final String KEY_X509_CERT
JSON key entity X.509 certificate.

See Also:
Constant Field Values

x509cert

private final X509Certificate x509cert
Entity X.509 certificate.


identity

private final String identity
Entity identity.

Constructor Detail

X509AuthenticationData

public X509AuthenticationData(X509Certificate x509cert)
                       throws MslCryptoException
Construct a new X.509 asymmetric keys authentication data instance from the provided X.509 certificate.

Parameters:
x509cert - entity X.509 certificate.
Throws:
MslCryptoException - if the X.509 certificate data cannot be parsed.

X509AuthenticationData

X509AuthenticationData(JSONObject x509AuthJO)
                 throws MslCryptoException,
                        MslEncodingException
Construct a new X.509 asymmetric keys authentication data instance from the provided JSON object.

Parameters:
x509AuthJO - the authentication data JSON object.
Throws:
MslCryptoException - if the X.509 certificate data cannot be parsed.
MslEncodingException - if the X.509 certificate cannot be found.
Method Detail

getX509Cert

public X509Certificate getX509Cert()
Returns:
the X.509 certificate.

getIdentity

public String getIdentity()
Specified by:
getIdentity in class EntityAuthenticationData
Returns:
the entity identity.

getAuthData

public JSONObject getAuthData()
                       throws MslEncodingException
Specified by:
getAuthData in class EntityAuthenticationData
Returns:
the authentication data JSON representation.
Throws:
MslEncodingException - if there was an error constructing the JSON representation.

equals

public boolean equals(Object obj)
Overrides:
equals in class EntityAuthenticationData

hashCode

public int hashCode()
Overrides:
hashCode in class EntityAuthenticationData

Message Security Layer (MSL)

Copyright © 2014 Netflix, Inc. All Rights Reserved.