Codota Logo
AuthenticationManager
Code IndexAdd Codota to your IDE (free)

How to use
AuthenticationManager
in
org.dspace.authenticate

Best Java code snippets using org.dspace.authenticate.AuthenticationManager (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: org.dspace/dspace-sword-api

/**
 * Does the given username and password authenticate for the
 * given DSpace Context?
 * 
 * @param context
 * @param un
 * @param pw
 * @return    true if yes, false if not
 */
public boolean authenticates(Context context, String un, String pw)
{
  int auth = AuthenticationManager.authenticate(context, un, pw, null, null);
  if (auth == AuthenticationMethod.SUCCESS)
  {
    return true;
  }
  return false;
}
origin: org.dspace/dspace-xmlui-api

/**
 * Determine if the EPerson (to be created or already created) has the
 * ability to set their own password.
 * 
 * @param objectModel
 *              The Cocoon object model
 * @param email
 *              The email address of the EPerson.
 * @return
 */
public static boolean allowSetPassword(Map objectModel, String email) throws SQLException
{
  final HttpServletRequest request = (HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);
  Context context = ContextUtil.obtainContext(objectModel);
  
  return AuthenticationManager.allowSetPassword(context, request, email);
}

origin: org.dspace/dspace-xmlui-api

.authenticationMethodIterator();
origin: org.dspace/dspace-xmlui-api

int[] groupIDs = AuthenticationManager.getSpecialGroups(context, request);
origin: org.dspace/dspace-xmlui-api

Context context = ContextUtil.obtainContext(objectModel);
int implicitStatus = AuthenticationManager.authenticateImplicit(
    context, null, null, null, request);
  int explicitStatus = AuthenticationManager.authenticate(context,
      email, password, realm, request);
origin: org.dspace/dspace-jspui-api

if (AuthenticationManager.authenticateImplicit(context, null, null,
    null, request) == AuthenticationMethod.SUCCESS)
  Iterator ai = AuthenticationManager.authenticationMethodIterator();
  AuthenticationMethod am;
  int count = 0;
origin: org.dspace/dspace-jspui-api

AuthenticationManager.initEPerson(context, request, eperson);
  AuthenticationManager.allowSetPassword(context, request,
    eperson.getEmail()))
  boolean setPassword = AuthenticationManager.allowSetPassword(
      context, request, email);
  request.setAttribute("set.password", Boolean.valueOf(setPassword));
origin: org.dspace/dspace-xmlui-api

/**
 * Determine if the email can register itself or needs to be
 * created by a site administrator first.
 * 
 * @param objectModel
 *          The Cocoon object model
 * @param email
 *          The email of the person to be registered.
 * @return true if the email can register, otherwise false.
 */
public static boolean canSelfRegister(Map objectModel, String email) throws SQLException 
{
  final HttpServletRequest request = (HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);
  Context context = ContextUtil.obtainContext(objectModel);
  
  if (SystemwideAlerts.canUserStartSession())
  {
    return AuthenticationManager.canSelfRegister(context, request, email);
  }
  else
  {
    // System wide alerts is preventing new sessions.
    return false;
  }
}

origin: org.dspace/dspace-xmlui-api

/**
 * Perform implicit authentication. The authenticationManager will consult
 * the authentication stack for any methods that can implicitly authenticate
 * this session. If the attempt was successful then the returned context
 * will have an eperson attached other wise the context will not have an
 * eperson attached.
 * 
 * @param objectModel
 *            Cocoon's object model.
 * @return This requests DSpace context.
 */
public static Context authenticateImplicit(Map objectModel)
    throws SQLException
{
  // Get the real HttpRequest
  final HttpServletRequest request = (HttpServletRequest) objectModel
      .get(HttpEnvironment.HTTP_REQUEST_OBJECT);
  Context context = ContextUtil.obtainContext(objectModel);
  int implicitStatus = AuthenticationManager.authenticateImplicit(
      context, null, null, null, request);
  if (implicitStatus == AuthenticationMethod.SUCCESS)
  {
    log.info(LogManager.getHeader(context, "login", "type=implicit"));
    AuthenticationUtil.logIn(context, request, context.getCurrentUser());
  }
  return context;
}
origin: org.dspace/dspace-xmlui-api

AuthenticationManager.initEPerson(context, request, eperson);
origin: org.dspace/dspace-jspui-api

int[] groupIDs = AuthenticationManager.getSpecialGroups(c, request);
origin: org.dspace/dspace-jspui-api

AuthenticationManager.canSelfRegister(context, request, email);
origin: org.dspace/dspace-xmlui-api

int[] groupIDs = AuthenticationManager.getSpecialGroups(context,
    request);
for (int groupID : groupIDs)
origin: org.dspace/dspace-sword-api

  /**
   * Does the given username and password authenticate for the
   * given DSpace Context?
   * 
   * @param context
   * @param un
   * @param pw
   * @return    true if yes, false if not
   */
  public boolean authenticates(Context context, String un, String pw)
  {
    int auth = AuthenticationManager.authenticate(context, un, pw, null, null);
    if (auth == AuthenticationMethod.SUCCESS)
    {
      return true;
    }
    return false;
  }
}
origin: org.dspace/dspace-xmlui-api

    .get(HttpEnvironment.HTTP_REQUEST_OBJECT);
final Iterator<AuthenticationMethod> authMethods = AuthenticationManager
      .authenticationMethodIterator();
origin: org.dspace/dspace-jspui-api

  AuthenticationManager.allowSetPassword(context, request, email);
request.setAttribute("set.password", Boolean.valueOf(setPassword));
origin: org.dspace/dspace-xmlui-api

int[] groupIDs = AuthenticationManager.getSpecialGroups(context, request);
for (int groupID : groupIDs)
origin: org.dspace/dspace-jspui-api

int status = AuthenticationManager.authenticate(context, null, null, null, request);
origin: org.dspace/dspace-xmlui-api

  WingException {
Iterator authMethods = AuthenticationManager
    .authenticationMethodIterator();
Request request = ObjectModelHelper.getRequest(objectModel);
HttpSession session = request.getSession();
origin: org.dspace/dspace-sword-api

sc.setAuthenticated(ep);
int[] groupIDs = AuthenticationManager.getSpecialGroups(context, null);
  oboContext.setCurrentUser(epObo);
  int[] groupIDs = AuthenticationManager.getSpecialGroups(oboContext, null);
org.dspace.authenticateAuthenticationManager

Most used methods

  • authenticate
  • getSpecialGroups
  • allowSetPassword
  • authenticateImplicit
  • authenticationMethodIterator
  • canSelfRegister
  • initEPerson

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getContentResolver (Context)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now