|
Message Security Layer (MSL) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netflix.msl.userauth.UserAuthenticationFactory
public abstract class UserAuthenticationFactory
A user authentication factory creates authentication data instances and performs authentication for a specific user authentication scheme.
Field Summary | |
---|---|
private UserAuthenticationScheme |
scheme
The factory's user authentication scheme. |
Constructor Summary | |
---|---|
protected |
UserAuthenticationFactory(UserAuthenticationScheme scheme)
Create a new user authentication factory for the specified scheme. |
Method Summary | |
---|---|
abstract MslUser |
authenticate(MslContext ctx,
String identity,
UserAuthenticationData data,
UserIdToken userIdToken)
Authenticate the user using the provided authentication data. |
abstract UserAuthenticationData |
createData(MslContext ctx,
MasterToken masterToken,
JSONObject userAuthJO)
Construct a new user authentication data instance from the provided JSON. |
UserAuthenticationScheme |
getScheme()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final UserAuthenticationScheme scheme
Constructor Detail |
---|
protected UserAuthenticationFactory(UserAuthenticationScheme scheme)
scheme
- the user authentication scheme.Method Detail |
---|
public UserAuthenticationScheme getScheme()
public abstract UserAuthenticationData createData(MslContext ctx, MasterToken masterToken, JSONObject userAuthJO) throws MslEncodingException, MslUserAuthException, MslCryptoException
Construct a new user authentication data instance from the provided JSON.
A master token may be required for certain user authentication schemes.
ctx
- MSL context.masterToken
- the entity master token. May be null
.userAuthJO
- the JSON object.
MslEncodingException
- if there is an error parsing the JSON.
MslUserAuthException
- if there is an error creating the user
authentication data.
MslCryptoException
- if there is an error with the user
authentication data cryptography.public abstract MslUser authenticate(MslContext ctx, String identity, UserAuthenticationData data, UserIdToken userIdToken) throws MslUserAuthException, MslUserIdTokenException
Authenticate the user using the provided authentication data.
If a user ID token is provided then also validate the authenticated user against the provided user ID token. This is typically a check to ensure the user identities are equal but not always. The returned user must be the user identified by the user ID token.
ctx
- MSL context.identity
- the entity identity.data
- user authentication data.userIdToken
- user ID token. May be null
.
MslUserAuthException
- if there is an error authenticating the
user or if the user authentication data and user ID token
identities do not match.
MslUserIdTokenException
- if there is a problem with the user ID
token.
|
Message Security Layer (MSL) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |