001/*
002 * Copyright (c) 2006-2012 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 *
009 * Contributors:
010 *     Nuxeo - initial API and implementation
011 *
012 * $Id$
013 */
014
015package org.nuxeo.runtime.api.login;
016
017import javax.security.auth.callback.Callback;
018import javax.security.auth.callback.CallbackHandler;
019
020/**
021 * A simple callback handler that can be used to get authentication credentials as a Java Object.
022 * <p>
023 * The type of object is specific to each {@link CallbackHandler} that is accepting this callback.
024 *
025 * @author eionica@nuxeo.com
026 */
027public class CredentialsCallback implements Callback {
028
029    private Object credentials;
030
031    public CredentialsCallback() {
032    }
033
034    public Object getCredentials() {
035        return credentials;
036    }
037
038    public void setCredentials(Object credentials) {
039        this.credentials = credentials;
040    }
041
042}