Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 8.1 API Reference

## weblogic.security.spi
Interface CredentialMapper

public interface CredentialMapper

The `CredentialMapper` interface defines the security service provider interface (SSPI) for objects capable of obtaining the appropriate set of credentials for a particular resource that is scoped within an application.

An implementation of the `CredentialMapper` interface is the part of a Credential Mapping provider that must return at least two specific credential formats as defined by the Java Connector Architecture specification:

- Password-based credentials must be returned as an instance of the `javax.resource.spi.security.PasswordCredential` class. An implementation is not expected to populate the `ManagedConnectionFactory`.
- Token-based credentials must be returned as a class that implements the `javax.resource.spi.security.GenericCredential` interface.

Credential Mapping providers may implement other types of objects that represent other types of credentials in addition to the ones listed above.

Author:
  Copyright © 2004 BEA Systems, Inc. All Rights Reserved.

Field Summary
`static java.lang.String` | `USER_PASSWORD_TYPE` The static credentials type identifier that is used by the WebLogic Security Framework and passed to the WebLogic Credential Mapping provider through the Credential Manager in the `getCredential` method.

Method Summary
`java.lang.Object` | `getCredentials(javax.security.auth.Subject requestor, java.lang.String initiator, Resource resource, java.lang.String[] credentialTypes)` Gets the set of supported credentials for the target resource, based on the identity of the initiating principal.
`java.util.Vector` | `getCredentials(javax.security.auth.Subject requestor, javax.security.auth.Subject initiator, Resource resource, java.lang.String[] credentialTypes)` Gets the set of supported credentials for the target resource, based on the identity of the initiating principal that is specified in the subject.

Field Detail

### USER_PASSWORD_TYPE

    public static final java.lang.String USER_PASSWORD_TYPE

  The static credentials type identifier that is used by the WebLogic Security Framework and passed to the WebLogic Credential Mapping provider through the Credential Manager in the `getCredential` method. It is used to determine the credential type requested by the caller.

Method Detail

### getCredentials

    public java.util.Vector getCredentials(javax.security.auth.Subject requestor,
                                           javax.security.auth.Subject initiator,
                                           Resource resource,
                                           java.lang.String[] credentialTypes)

  Gets the set of supported credentials for the target resource, based on the identity of the initiating principal that is specified in the subject. If no credentials match the supported credentials, no credentials should be returned and no exception should be thrown.

  Parameters:
    `requestor` - a `Subject` object specifying one or more principals that represent the identity of the entity that is requesting the credential information. Some of the principals contained within the subject may represent alternate identities, such as the identity of a group for which the subject is a member.

    `initiator` - a `Subject` object specifying one or more principals that represent the identity for which credential information is being retrieved. Some of the principals contained within the subject may represent alternate identities, such as the identity of a group for which the subject is a member.

    `resource` - a `Resource` object indicating the type of resource on which the subject is attempting to perform a request.

    `credentialTypes` - an array of `String` objects specifying the types of credentials being requested.

  Returns:
    a `Vector` object containing the appropriate type of credentials for the target resource.

### getCredentials

    public java.lang.Object getCredentials(javax.security.auth.Subject requestor,
                                           java.lang.String initiator,
                                           Resource resource,
                                           java.lang.String[] credentialTypes)

  Gets the set of supported credentials for the target resource, based on the identity of the initiating principal. If no credentials match the supported credentials, no credentials should be returned and no exception should be thrown.

  Parameters:
    `requestor` - a `Subject` object specifying one or more principals that represent the identity of the entity that is requesting the credential information. Some of the principals contained within the subject may represent alternate identities, such as the identity of a group for which the subject is a member.

    `initiator` - a `String` object specifying the identity for which credential information is being retrieved.

    `resource` - a `Resource` object indicating the type of resource on which the subject is attempting to perform a request.

    `credentialTypes` - an array of `String` objects specifying the types of credentials being requested.

  Returns:
    an `Object` containing the appropriate type of credentials for the target resource.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs81
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD