gluu
公開メンバ関数 | 公開変数類 | 全メンバ一覧
BasicResetToStepExternalAuthenticator.PersonAuthentication クラス
BasicResetToStepExternalAuthenticator.PersonAuthentication の継承関係図
Inheritance graph
BasicResetToStepExternalAuthenticator.PersonAuthentication 連携図
Collaboration graph

公開メンバ関数

def __init__ (self, currentTimeMillis)
 
def init (self, configurationAttributes)
 
def destroy (self, configurationAttributes)
 
def getApiVersion (self)
 
def isValidAuthenticationMethod (self, usageType, configurationAttributes)
 
def getAlternativeAuthenticationMethod (self, usageType, configurationAttributes)
 
def authenticate (self, configurationAttributes, requestParameters, step)
 
def getNextStep (self, configurationAttributes, requestParameters, step)
 
def prepareForStep (self, configurationAttributes, requestParameters, step)
 
def getExtraParametersForStep (self, configurationAttributes, step)
 
def getCountAuthenticationSteps (self, configurationAttributes)
 
def getPageForStep (self, configurationAttributes, step)
 
def logout (self, configurationAttributes, requestParameters)
 

公開変数類

 currentTimeMillis
 

詳解

構築子と解体子

◆ __init__()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.__init__ (   self,
  currentTimeMillis 
)
15  def __init__(self, currentTimeMillis):
16  self.currentTimeMillis = currentTimeMillis
17 

関数詳解

◆ authenticate()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.authenticate (   self,
  configurationAttributes,
  requestParameters,
  step 
)
37  def authenticate(self, configurationAttributes, requestParameters, step):
38  authenticationService = CdiUtil.bean(AuthenticationService)
39 
40  if 1 <= step <= 3:
41  print "Basic (demo reset step). Authenticate for step '%s'" % step
42 
43  identity = CdiUtil.bean(Identity)
44  identity.setWorkingParameter("pass_authentication", False)
45 
46  credentials = identity.getCredentials()
47  user_name = credentials.getUsername()
48  user_password = credentials.getPassword()
49 
50  logged_in = False
51  if (StringHelper.isNotEmptyString(user_name) and StringHelper.isNotEmptyString(user_password)):
52  userService = CdiUtil.bean(UserService)
53  logged_in = authenticationService.authenticate(user_name, user_password)
54 
55  if (not logged_in):
56  return False
57 
58  identity.setWorkingParameter("pass_authentication", True)
59  return True
60  else:
61  return False
62 

◆ destroy()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.destroy (   self,
  configurationAttributes 
)
23  def destroy(self, configurationAttributes):
24  print "Basic (demo reset step). Destroy"
25  print "Basic (demo reset step). Destroyed successfully"
26  return True
27 

◆ getAlternativeAuthenticationMethod()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.getAlternativeAuthenticationMethod (   self,
  usageType,
  configurationAttributes 
)
34  def getAlternativeAuthenticationMethod(self, usageType, configurationAttributes):
35  return None
36 

◆ getApiVersion()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.getApiVersion (   self)
28  def getApiVersion(self):
29  return 2
30 

◆ getCountAuthenticationSteps()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.getCountAuthenticationSteps (   self,
  configurationAttributes 
)
87  def getCountAuthenticationSteps(self, configurationAttributes):
88  return 3
89 

◆ getExtraParametersForStep()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.getExtraParametersForStep (   self,
  configurationAttributes,
  step 
)
84  def getExtraParametersForStep(self, configurationAttributes, step):
85  return None
86 

◆ getNextStep()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.getNextStep (   self,
  configurationAttributes,
  requestParameters,
  step 
)
63  def getNextStep(self, configurationAttributes, requestParameters, step):
64  print "Basic (demo reset step). Get next step for step '%s'" % step
65  identity = CdiUtil.bean(Identity)
66 
67  # If user not pass current step authenticaton change step to previous
68  pass_authentication = identity.getWorkingParameter("pass_authentication")
69  if not pass_authentication:
70  if step > 1:
71  resultStep = step - 1
72  print "Basic (demo reset step). Get next step. Changing step to '%s'" % resultStep
73  return resultStep
74 
75  return -1
76 

◆ getPageForStep()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.getPageForStep (   self,
  configurationAttributes,
  step 
)
90  def getPageForStep(self, configurationAttributes, step):
91  return ""
92 

◆ init()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.init (   self,
  configurationAttributes 
)
18  def init(self, configurationAttributes):
19  print "Basic (demo reset step). Initialization"
20  print "Basic (demo reset step). Initialized successfully"
21  return True
22 

◆ isValidAuthenticationMethod()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.isValidAuthenticationMethod (   self,
  usageType,
  configurationAttributes 
)
31  def isValidAuthenticationMethod(self, usageType, configurationAttributes):
32  return True
33 

◆ logout()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.logout (   self,
  configurationAttributes,
  requestParameters 
)
93  def logout(self, configurationAttributes, requestParameters):
94  return True
95 

◆ prepareForStep()

def BasicResetToStepExternalAuthenticator.PersonAuthentication.prepareForStep (   self,
  configurationAttributes,
  requestParameters,
  step 
)
77  def prepareForStep(self, configurationAttributes, requestParameters, step):
78  print "Basic (demo reset step). Prepare for step '%s'" % step
79  if 1 <= step <= 3:
80  return True
81  else:
82  return False
83 

メンバ詳解

◆ currentTimeMillis

BasicResetToStepExternalAuthenticator.PersonAuthentication.currentTimeMillis

このクラス詳解は次のファイルから抽出されました: