Oracle Fusion Middleware
Oracle WebLogic Server API Reference
12c Release 1 (12.1.1)

Part Number E24391-02

weblogic.wsee.security.saml
Class SAMLCredentialImpl

java.lang.Object
  extended by weblogic.wsee.security.saml.SAMLCredentialImpl
All Implemented Interfaces:
SAMLCredential

public class SAMLCredentialImpl
extends Object
implements SAMLCredential

User: sychang Date: Jul 19, 2006 Time: 2:36:12 PM


Constructor Summary
protected SAMLCredentialImpl()
           
  SAMLCredentialImpl(Node node)
           
  SAMLCredentialImpl(String tokenType, Object cred)
          create a new SAML 20 credential with the SAML 2.0 assertion
  SAMLCredentialImpl(String tokenType, Object cred, PrivateKey privateKey)
          create a new saml credential with private key of the saml requester
 
Method Summary
 String getAssertionID()
          AssertionID of SAML Assertion
 SAMLAttributeStatementData getAttributes()
          Get the SAMLAttributeStatemnetInfo or SAML2AttributeStatemnetInfo from the SAML Token
 Object getCredential()
          get the credential object
 Element getEncryptedKey()
          get the EncryptedKey object
 weblogic.xml.crypto.common.keyinfo.EncryptedKeyProvider getEncryptedKeyProvider()
          get EncryptedKeyProvider object
 Key getHolderOfKey()
          return sender's key for holder-of-key
 PrivateKey getPrivateKey()
          get the private key
 SecurityTokenReference getSecurityTokenReference()
           
 Key getSymmetircKey()
          return symmetric key for holder-of-key
 String getTokenType()
          This method will return TokenType Attribute Value base on the SAML Token as following: V1.1 http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1 V2.0 http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0
 String getVersion()
           
 X509Certificate getX509Cert()
          get the X509 Certificate in this SAML Token.
 boolean isHolderOfKey()
          check is this credential use HoK confirmation
 boolean isSaml2()
           
 void setAttributes(SAMLAttributeStatementData attributes)
          Save the SAML Attributes into this SAML Token
 void setCredential(Object credential)
          set the credential object
 void setEncryptedKeyProvider(weblogic.xml.crypto.common.keyinfo.EncryptedKeyProvider encryptedKeyProvider)
          set EncryptedKeyProvider object
 void setPrivateKey(PrivateKey privateKey)
          set the private key
 void setSymmetircKey(Key symmetircKey)
          set symmetric key for holder-of-key
 void setTokenType(String tokenType)
           
 void verbose()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMLCredentialImpl

protected SAMLCredentialImpl()

SAMLCredentialImpl

public SAMLCredentialImpl(Node node)

SAMLCredentialImpl

public SAMLCredentialImpl(String tokenType,
                          Object cred)
create a new SAML 20 credential with the SAML 2.0 assertion

Parameters:
cred - saml assertion node

SAMLCredentialImpl

public SAMLCredentialImpl(String tokenType,
                          Object cred,
                          PrivateKey privateKey)
create a new saml credential with private key of the saml requester

Parameters:
privateKey - private key of the
cred - holder-of-key of saml assertion that contains the saml requester's public key
Method Detail

verbose

public void verbose()

getAttributes

public SAMLAttributeStatementData getAttributes()
Get the SAMLAttributeStatemnetInfo or SAML2AttributeStatemnetInfo from the SAML Token

Specified by:
getAttributes in interface SAMLCredential
Returns:
SAMLAttributeStatementData object that can be either SAML 1.1 or SAML 2.0 attributes

setAttributes

public void setAttributes(SAMLAttributeStatementData attributes)
Save the SAML Attributes into this SAML Token

Specified by:
setAttributes in interface SAMLCredential
Parameters:
attributes - SAMLAttributeStatementData object to be saved

getVersion

public String getVersion()
Specified by:
getVersion in interface SAMLCredential

isSaml2

public boolean isSaml2()
Specified by:
isSaml2 in interface SAMLCredential

getAssertionID

public String getAssertionID()
AssertionID of SAML Assertion

Specified by:
getAssertionID in interface SAMLCredential
Returns:
assertion id

getTokenType

public String getTokenType()
This method will return TokenType Attribute Value base on the SAML Token as following:
  1. V1.1 http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1
  2. V2.0 http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0

Null will be reutrned for SAML Token Profile 1.0 type of Token. as there is no Token Type for SAML Token Profile 1.0.

Specified by:
getTokenType in interface SAMLCredential
Returns:
TokenType Attribute Value string

setTokenType

public void setTokenType(String tokenType)

setCredential

public void setCredential(Object credential)
set the credential object

Specified by:
setCredential in interface SAMLCredential
Parameters:
credential - SAML assertion node to set

getCredential

public Object getCredential()
get the credential object

Specified by:
getCredential in interface SAMLCredential
Returns:
SAML assertion object

setPrivateKey

public void setPrivateKey(PrivateKey privateKey)
set the private key

Specified by:
setPrivateKey in interface SAMLCredential
Parameters:
privateKey - private key to set

getPrivateKey

public PrivateKey getPrivateKey()
get the private key

Specified by:
getPrivateKey in interface SAMLCredential
Returns:
private key

isHolderOfKey

public boolean isHolderOfKey()
check is this credential use HoK confirmation

Specified by:
isHolderOfKey in interface SAMLCredential
Returns:
true is it is HoK, false otherwise

getHolderOfKey

public Key getHolderOfKey()
return sender's key for holder-of-key

Specified by:
getHolderOfKey in interface SAMLCredential
Returns:
the sender's key for holder-of-key

getSymmetircKey

public Key getSymmetircKey()
return symmetric key for holder-of-key

Specified by:
getSymmetircKey in interface SAMLCredential
Returns:
the symmetric key for holder-of-key

setSymmetircKey

public void setSymmetircKey(Key symmetircKey)
set symmetric key for holder-of-key

Specified by:
setSymmetircKey in interface SAMLCredential
Parameters:
symmetircKey - the symmetric key for holder-of-key

getEncryptedKey

public Element getEncryptedKey()
get the EncryptedKey object

Specified by:
getEncryptedKey in interface SAMLCredential
Returns:
the encryptedKey object, null for no encryptedKey object

getEncryptedKeyProvider

public weblogic.xml.crypto.common.keyinfo.EncryptedKeyProvider getEncryptedKeyProvider()
get EncryptedKeyProvider object

Specified by:
getEncryptedKeyProvider in interface SAMLCredential
Returns:
EncryptedKeyProvider object

setEncryptedKeyProvider

public void setEncryptedKeyProvider(weblogic.xml.crypto.common.keyinfo.EncryptedKeyProvider encryptedKeyProvider)
set EncryptedKeyProvider object

Specified by:
setEncryptedKeyProvider in interface SAMLCredential
Parameters:
encryptedKeyProvider - EncryptedKeyProvider object to be set

getX509Cert

public X509Certificate getX509Cert()
get the X509 Certificate in this SAML Token.

Specified by:
getX509Cert in interface SAMLCredential
Returns:
X509 Certificate

getSecurityTokenReference

public SecurityTokenReference getSecurityTokenReference()

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
12c Release 1 (12.1.1)

Part Number E24391-02