public class CodeAuthentication extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
CodeAuthentication.Identity |
| Modifier and Type | Field and Description |
|---|---|
static long |
IDENTITY_LIFETIME
Lifetime of an identity in milliseconds.
|
protected static org.exoplatform.services.log.Log |
LOG |
| Constructor and Description |
|---|
CodeAuthentication(org.exoplatform.services.idgenerator.IDGeneratorService idGenerator,
org.exoplatform.services.jcr.RepositoryService jcrService) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final long IDENTITY_LIFETIME
protected static final org.exoplatform.services.log.Log LOG
public CodeAuthentication(org.exoplatform.services.idgenerator.IDGeneratorService idGenerator,
org.exoplatform.services.jcr.RepositoryService jcrService)
public String authenticate(String serviceURL, String user, String password)
exchangeCode(String).serviceURL - Stringuser - Stringpassword - StringStringexchangeCode(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 - StringCodeAuthentication.Identity of an userAuthenticationException - 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 - StringAuthenticationExceptionexchangeCode(String)@Deprecated public boolean hasCodeContext(String code)
Copyright © 2003–2015 eXo Platform SAS. All rights reserved.