Changeset 2255


Ignore:
Timestamp:
Feb 26, 2014, 11:34:55 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #580: Authenticate users using YubiKey? sticks

Updating code to make it compatible with BASE core after http://base.thep.lu.se/changeset/6425

Location:
extensions/net.sf.basedb.yubikey/trunk/src/net/sf/basedb/yubikey
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.yubikey/trunk/src/net/sf/basedb/yubikey/YubiKey.java

    r2252 r2255  
    2222package net.sf.basedb.yubikey;
    2323
     24import net.sf.basedb.core.authentication.AuthenticationMethod;
     25
    2426/**
    2527  Global constants for the YubiKey package.
     
    3537
    3638
     39  public static final AuthenticationMethod AUTHENTICATION_METHOD = AuthenticationMethod.getInstance("yubikey");
     40 
    3741}
  • extensions/net.sf.basedb.yubikey/trunk/src/net/sf/basedb/yubikey/YubiKeyAuthenticationManager.java

    r2252 r2255  
    77
    88import net.sf.basedb.core.AuthenticationContext;
    9 import net.sf.basedb.core.authentication.AuthenticationInformation;
     9import net.sf.basedb.core.authentication.AuthenticatedUser;
    1010import net.sf.basedb.core.authentication.AuthenticationManager;
    1111import net.sf.basedb.core.authentication.LoginException;
     
    2525 
    2626  @Override
    27   public AuthenticationInformation authenticate()
     27  public AuthenticatedUser authenticate()
    2828  {
    29     AuthenticationInformation authInfo = null;
     29    AuthenticatedUser authInfo = null;
    3030    LoginRequest request = context.getLoginRequest();
    3131    String login = request.getLogin();
     
    6868          LoginRequest internal = new LoginRequest(user.getLogin(), request.getPassword());
    6969          context.verifyUserInternal(internal);
    70           authInfo = new AuthenticationInformation(login, externalId);
     70          authInfo = new AuthenticatedUser(YubiKey.AUTHENTICATION_METHOD, user);
    7171        }
    7272        else
     
    8080  }
    8181
    82   @Override
    83   public boolean supportsExtraInformation()
    84   {
    85     return false;
    86   }
    8782
    8883}
Note: See TracChangeset for help on using the changeset viewer.