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 "u...@g4.xx" 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, "u...@g4.xx");
        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 "u...@g4.xx"?
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 dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
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