Package org.opensaml.saml.security.impl

# Class SAMLMDCredentialContext

java.lang.Object
org.opensaml.saml.security.impl.SAMLMDCredentialContext

All Implemented Interfaces:
  `CredentialContext`

public class SAMLMDCredentialContext extends Object implements CredentialContext
A credential context for credentials resolved from a `KeyInfo` that was found in SAML 2 metadata.

## Field Summary

Fields
Modifier and Type
Field
Description
`private List<EncryptionMethod>`
`encMethods`
Encryption methods associated with the credential.
`private KeyDescriptor`
`keyDescriptor`
Key descriptor which contained the KeyInfo used.
`private RoleDescriptor`
`role`
Role in which credential was resolved.

## Constructor Summary

Constructors
Constructor
Description
`SAMLMDCredentialContext(KeyDescriptor descriptor)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`List<EncryptionMethod>`
`getEncryptionMethods()`
Return the list of `EncryptionMethod`'s associated with credential context.
`KeyDescriptor`
`getKeyDescriptor()`
Get the key descriptor context.
`RoleDescriptor`
`getRoleDescriptor()`
Get the role descriptor context.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### keyDescriptor

@Nullable private KeyDescriptor keyDescriptor
Key descriptor which contained the KeyInfo used.

### role

@Nullable private RoleDescriptor role
Role in which credential was resolved.

### encMethods

@Nullable private List<EncryptionMethod> encMethods
Encryption methods associated with the credential.

## Constructor Details

### SAMLMDCredentialContext

public SAMLMDCredentialContext(KeyDescriptor descriptor)
Constructor.

Parameters:
  `descriptor` - the KeyDescriptor context from which a credential was resolved

## Method Details

### getKeyDescriptor

@Nullable public KeyDescriptor getKeyDescriptor()
Get the key descriptor context.

Returns:
  key descriptor

### getEncryptionMethods

@Nullable @NotLive @Unmodifiable public List<EncryptionMethod> getEncryptionMethods()
Return the list of `EncryptionMethod`'s associated with credential context.

Returns:
  a list of SAML metadata encryption method associated with this context

### getRoleDescriptor

@Nullable public RoleDescriptor getRoleDescriptor()
Get the role descriptor context.

Returns:
  role descriptor