|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.clouddrive.cmis.login.CodeAuthentication
public class CodeAuthentication
Maintain temporal codes for authentication in OAuth2 fashion. This component doesn't persist the codes.
Only the last attempt actual (will work for the user).
Created by The eXo Platform SAS
| Nested Class Summary | |
|---|---|
class |
CodeAuthentication.Identity
|
| Field Summary | |
|---|---|
static long |
IDENTITY_LIFETIME
Lifetime of an identity in milliseconds. |
protected static org.exoplatform.services.log.Log |
LOG
|
| Constructor Summary | |
|---|---|
CodeAuthentication(org.exoplatform.services.idgenerator.IDGeneratorService idGenerator,
org.exoplatform.services.jcr.RepositoryService jcrService)
|
|
| Method Summary | |
|---|---|
String |
authenticate(String serviceURL,
String user,
String password)
Create user identity for given user name, password and a service URL. |
CodeAuthentication.Identity |
exchangeCode(String code)
Exchange given code on user identity associated with this code in authenticate(String, String, String). |
boolean |
hasCode(String code)
Deprecated. |
boolean |
hasCodeContext(String code)
Deprecated. |
void |
setCodeContext(String code,
String context)
Set identity context for a code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long IDENTITY_LIFETIME
protected static final org.exoplatform.services.log.Log LOG
| Constructor Detail |
|---|
public CodeAuthentication(org.exoplatform.services.idgenerator.IDGeneratorService idGenerator,
org.exoplatform.services.jcr.RepositoryService jcrService)
| Method Detail |
|---|
public String authenticate(String serviceURL,
String user,
String password)
exchangeCode(String).
serviceURL - Stringuser - Stringpassword - String
StringexchangeCode(String)@Deprecated public boolean hasCode(String code)
public CodeAuthentication.Identity exchangeCode(String code)
throws AuthenticationException
authenticate(String, String, String). User identity after this method may be not fully
initialized as for its context. Identity context is optional and can be initialized by
setCodeContext(String, String) method once, after that call identity will be fully removed from
the authenticator.AuthenticationException will be thrown.
code - String
CodeAuthentication.Identity of an user
AuthenticationException - if code doesn't match any usersetCodeContext(String, String)
public void setCodeContext(String code,
String context)
throws AuthenticationException
exchangeCode(String),
after this it will be fully removed from the authenticator.AuthenticationException will be thrown.
code - Stringcontext - String
AuthenticationExceptionexchangeCode(String)@Deprecated public boolean hasCodeContext(String code)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||