|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jgroups.auth.AuthToken org.jgroups.auth.SimpleToken
public class SimpleToken
This is an example of using a preshared token for authentication purposes. All members of the group have to have the same string value in the JGroups config.
JGroups config parameters:
AuthToken
Field Summary |
---|
Fields inherited from class org.jgroups.auth.AuthToken |
---|
auth, log |
Constructor Summary | |
---|---|
SimpleToken()
|
|
SimpleToken(java.lang.String authvalue)
|
Method Summary | |
---|---|
boolean |
authenticate(AuthToken token,
Message msg)
This method should be implemented to perform the actual authentication of joining members. |
java.lang.String |
getAuthValue()
|
java.lang.String |
getName()
Used to return the full package and class name of the implementation. |
void |
readFrom(java.io.DataInput in)
Required to deserialize the object when read in from the wire |
void |
setAuthValue(java.lang.String auth_value)
|
int |
size()
The size of the marshalled AuthToken |
java.lang.String |
toString()
|
void |
writeTo(java.io.DataOutput out)
Required to serialize the object to pass across the wire |
Methods inherited from class org.jgroups.auth.AuthToken |
---|
init, setAuth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleToken()
public SimpleToken(java.lang.String authvalue)
Method Detail |
---|
public java.lang.String getName()
AuthToken
getName
in class AuthToken
public java.lang.String getAuthValue()
public void setAuthValue(java.lang.String auth_value)
public boolean authenticate(AuthToken token, Message msg)
AuthToken
authenticate
in class AuthToken
token
- the token sent by the joinermsg
- the Message object containing the actual JOIN_REQ
public void writeTo(java.io.DataOutput out) throws java.lang.Exception
out
-
java.lang.Exception
public void readFrom(java.io.DataInput in) throws java.lang.Exception
in
-
java.lang.Exception
public int size()
AuthToken
size
in class AuthToken
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |