Check in before further refactoring.
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / model / TaxeditorLoginModule.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.taxeditor.model;
12
13 import java.util.Map;
14
15 import javax.security.auth.Subject;
16 import javax.security.auth.callback.CallbackHandler;
17 import javax.security.auth.login.LoginException;
18 import javax.security.auth.spi.LoginModule;
19
20 import org.apache.log4j.Logger;
21
22 /**
23 * @author n.hoffmann
24 * @created 01.07.2009
25 * @version 1.0
26 */
27 public class TaxeditorLoginModule implements LoginModule {
28 private static final Logger logger = Logger
29 .getLogger(TaxeditorLoginModule.class);
30
31 /* (non-Javadoc)
32 * @see javax.security.auth.spi.LoginModule#abort()
33 */
34 public boolean abort() throws LoginException {
35 // TODO Auto-generated method stub
36 return false;
37 }
38
39 /* (non-Javadoc)
40 * @see javax.security.auth.spi.LoginModule#commit()
41 */
42 public boolean commit() throws LoginException {
43 // TODO Auto-generated method stub
44 return false;
45 }
46
47 /* (non-Javadoc)
48 * @see javax.security.auth.spi.LoginModule#initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
49 */
50 public void initialize(Subject subject, CallbackHandler callbackHandler,
51 Map<String, ?> sharedState, Map<String, ?> options) {
52 // TODO Auto-generated method stub
53
54 }
55
56 /* (non-Javadoc)
57 * @see javax.security.auth.spi.LoginModule#login()
58 */
59 public boolean login() throws LoginException {
60
61 // Shell shell = TaxeditorStorePlugin.getDefault().getWorkbench()
62 // .getActiveWorkbenchWindow().getShell();
63 //
64 // LoginDialog loginDialog = new LoginDialog(shell);
65 // token = loginDialog.open();
66 //
67 // Authentication authentication = CdmStore.getAuthenticationManager().authenticate(token);
68 // SecurityContextHolder.getContext().setAuthentication(authentication);
69 //
70 return false;
71 }
72
73 /* (non-Javadoc)
74 * @see javax.security.auth.spi.LoginModule#logout()
75 */
76 public boolean logout() throws LoginException {
77 // TODO Auto-generated method stub
78 return false;
79 }
80 }