I need some users to be authenticated by an external system. If they are
authenticated, they should become users of a certain group (e.g. "G4"),
which gives them read access to a certain collection.

Assuming that there is an user "[email protected]" in group G4, I am wondering
will it work to have an AuthenticationMethod with such an authenticate
method:

public int authenticate(
Context context, String username, String password, String realm,
HttpServletRequest request)
throws Exception {
    if (validUser(username, password)) {
        EPerson eperson = EPerson.findByEmail(context, "[email protected]");
        context.setCurrentUser(eperson);
        return SUCCESS;
    }
    else {
        return BAD_CREDENTIALS;
    }
}

I don't know is it acceptable to have several users logged in
simultaneously as one and the same "[email protected]"?
Or can I make the "externally authenticated" users "anonymous" but
belonging to group G4?

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to