gluu
公開メンバ関数 | 公開変数類 | 全メンバ一覧
Cas2DuoExternalAuthenticator.PersonAuthentication クラス
Cas2DuoExternalAuthenticator.PersonAuthentication の継承関係図
Inheritance graph
Cas2DuoExternalAuthenticator.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 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
 
 cas2ExternalAuthenticator
 
 duoExternalAuthenticator
 

詳解

構築子と解体子

◆ __init__()

def Cas2DuoExternalAuthenticator.PersonAuthentication.__init__ (   self,
  currentTimeMillis 
)
18  def __init__(self, currentTimeMillis):
19  self.currentTimeMillis = currentTimeMillis
20 
21  self.cas2ExternalAuthenticator = Cas2ExternalAuthenticator(currentTimeMillis)
22  self.duoExternalAuthenticator = DuoExternalAuthenticator(currentTimeMillis)
23 
Definition: Cas2ExternalAuthenticator.py:1
Definition: DuoExternalAuthenticator.py:1

関数詳解

◆ authenticate()

def Cas2DuoExternalAuthenticator.PersonAuthentication.authenticate (   self,
  configurationAttributes,
  requestParameters,
  step 
)
64  def authenticate(self, configurationAttributes, requestParameters, step):
65  result = False
66 
67  start_duo = False
68  if step == 1:
69  # Execute CAS2 for step #1
70  result = self.cas2ExternalAuthenticator.authenticate(configurationAttributes, requestParameters, step)
71 
72  # Execute DUO prepareForStep and authenticate for step #1 if needed
73  cas2_count_steps = self.cas2ExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
74  if cas2_count_steps == 1:
75  result = result and self.duoExternalAuthenticator.prepareForStep(configurationAttributes, requestParameters, step)
76  result = result and self.duoExternalAuthenticator.authenticate(configurationAttributes, requestParameters, step)
77  elif step == 2:
78  # Execute CAS2 for step #2 if needed
79  cas2_count_steps = self.cas2ExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
80  if cas2_count_steps == 2:
81  result = self.cas2ExternalAuthenticator.authenticate(configurationAttributes, requestParameters, step)
82 
83  # Execute DUO prepareForStep and authenticate for step #1
84  result = result and self.duoExternalAuthenticator.prepareForStep(configurationAttributes, requestParameters, 1)
85  result = result and self.duoExternalAuthenticator.authenticate(configurationAttributes, requestParameters, 1)
86  else:
87  duo_count_steps = self.duoExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
88  if duo_count_steps == 2:
89  result = self.duoExternalAuthenticator.authenticate(configurationAttributes, requestParameters, step)
90  elif step == 3:
91  # Execute DUO for step #2 if needed
92  duo_count_steps = self.duoExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
93  if duo_count_steps == 2:
94  result = self.duoExternalAuthenticator.authenticate(configurationAttributes, requestParameters, 2)
95 
96  return result
97 

◆ destroy()

def Cas2DuoExternalAuthenticator.PersonAuthentication.destroy (   self,
  configurationAttributes 
)
34  def destroy(self, configurationAttributes):
35  print "CAS2 + Duo. Destroy"
36 
37  cas2_result = self.cas2ExternalAuthenticator.destroy(configurationAttributes)
38  duo_result = self.duoExternalAuthenticator.destroy(configurationAttributes)
39 
40  print "CAS2 + Duo. Destroyed successfully"
41 
42  return cas2_result and duo_result
43 

◆ getAlternativeAuthenticationMethod()

def Cas2DuoExternalAuthenticator.PersonAuthentication.getAlternativeAuthenticationMethod (   self,
  usageType,
  configurationAttributes 
)
53  def getAlternativeAuthenticationMethod(self, usageType, configurationAttributes):
54  cas2_result = self.cas2ExternalAuthenticator.getAlternativeAuthenticationMethod(usageType, configurationAttributes)
55  if cas2_result != None:
56  return cas2_result
57 
58  duo_result = self.duoExternalAuthenticator.getAlternativeAuthenticationMethod(usageType, configurationAttributes)
59  if duo_result != None:
60  return duo_result
61 
62  return None
63 

◆ getApiVersion()

def Cas2DuoExternalAuthenticator.PersonAuthentication.getApiVersion (   self)
44  def getApiVersion(self):
45  return 1
46 

◆ getCountAuthenticationSteps()

def Cas2DuoExternalAuthenticator.PersonAuthentication.getCountAuthenticationSteps (   self,
  configurationAttributes 
)
139  def getCountAuthenticationSteps(self, configurationAttributes):
140  cas2_count_steps = self.cas2ExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
141  duo_count_steps = self.duoExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
142  print "CAS2 + Duo. Get count authentication steps. cas2_count_steps = %s, duo_count_steps = %s" % (cas2_count_steps, duo_count_steps)
143 
144  if (cas2_count_steps == 1) and (duo_count_steps == 1):
145  return 1
146 
147  if (cas2_count_steps == 2) and (duo_count_steps == 2):
148  return 3
149 
150  return max(cas2_count_steps, duo_count_steps)
151 

◆ getExtraParametersForStep()

def Cas2DuoExternalAuthenticator.PersonAuthentication.getExtraParametersForStep (   self,
  configurationAttributes,
  step 
)
123  def getExtraParametersForStep(self, configurationAttributes, step):
124  cas2_result = self.cas2ExternalAuthenticator.getExtraParametersForStep(configurationAttributes, step)
125  duo_result = self.duoExternalAuthenticator.getExtraParametersForStep(configurationAttributes, step)
126 
127  if cas2_result == None:
128  return duo_result
129 
130  if duo_result == None:
131  return cas2_result
132 
133  result_list = ArrayList()
134  result_list.addAll(cas2_result)
135  result_list.addAll(duo_result)
136 
137  return result_list
138 

◆ getPageForStep()

def Cas2DuoExternalAuthenticator.PersonAuthentication.getPageForStep (   self,
  configurationAttributes,
  step 
)
152  def getPageForStep(self, configurationAttributes, step):
153  result = ""
154 
155  if step == 1:
156  result = self.cas2ExternalAuthenticator.getPageForStep(configurationAttributes, step)
157  elif step == 2:
158  cas2_count_steps = self.cas2ExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
159  if cas2_count_steps == 2:
160  result = self.cas2ExternalAuthenticator.getPageForStep(configurationAttributes, step)
161  else:
162  result = self.duoExternalAuthenticator.getPageForStep(configurationAttributes, step)
163  elif step == 3:
164  result = self.duoExternalAuthenticator.getPageForStep(configurationAttributes, step)
165 
166  return result
167 

◆ init()

def Cas2DuoExternalAuthenticator.PersonAuthentication.init (   self,
  configurationAttributes 
)
24  def init(self, configurationAttributes):
25  print "CAS2 + Duo. Initialization"
26 
27  cas2_result = self.cas2ExternalAuthenticator.init(configurationAttributes)
28  duo_result = self.duoExternalAuthenticator.init(configurationAttributes)
29 
30  print "CAS2 + Duo. Initialized successfully"
31 
32  return cas2_result and duo_result
33 

◆ isValidAuthenticationMethod()

def Cas2DuoExternalAuthenticator.PersonAuthentication.isValidAuthenticationMethod (   self,
  usageType,
  configurationAttributes 
)
47  def isValidAuthenticationMethod(self, usageType, configurationAttributes):
48  cas2_result = self.cas2ExternalAuthenticator.isValidAuthenticationMethod(usageType, configurationAttributes)
49  duo_result = self.duoExternalAuthenticator.isValidAuthenticationMethod(usageType, configurationAttributes)
50 
51  return cas2_result and duo_result
52 

◆ logout()

def Cas2DuoExternalAuthenticator.PersonAuthentication.logout (   self,
  configurationAttributes,
  requestParameters 
)
168  def logout(self, configurationAttributes, requestParameters):
169  cas2_result = self.cas2ExternalAuthenticator.logout(configurationAttributes, requestParameters)
170  duo_result = self.duoExternalAuthenticator.logout(configurationAttributes, requestParameters)
171 
172  return cas2_result and duo_result
173 

◆ prepareForStep()

def Cas2DuoExternalAuthenticator.PersonAuthentication.prepareForStep (   self,
  configurationAttributes,
  requestParameters,
  step 
)
98  def prepareForStep(self, configurationAttributes, requestParameters, step):
99  result = False
100 
101  # Execute CAS2 for step #1
102  if step == 1:
103  # Execute CAS2 for step #1
104  result = self.cas2ExternalAuthenticator.prepareForStep(configurationAttributes, requestParameters, step)
105  elif step == 2:
106  # Execute CAS2 for step #2 if needed
107  cas2_count_steps = self.cas2ExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
108  if cas2_count_steps == 2:
109  result = self.cas2ExternalAuthenticator.prepareForStep(configurationAttributes, requestParameters, step)
110  else:
111  # Execute DUO for step #2 if needed
112  duo_count_steps = self.duoExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
113  if duo_count_steps == 2:
114  result = self.duoExternalAuthenticator.prepareForStep(configurationAttributes, requestParameters, step)
115  elif step == 3:
116  # Execute DUO for step #2 if needed
117  duo_count_steps = self.duoExternalAuthenticator.getCountAuthenticationSteps(configurationAttributes)
118  if duo_count_steps == 2:
119  result = self.duoExternalAuthenticator.prepareForStep(configurationAttributes, requestParameters, 2)
120 
121  return result
122 

メンバ詳解

◆ cas2ExternalAuthenticator

Cas2DuoExternalAuthenticator.PersonAuthentication.cas2ExternalAuthenticator

◆ currentTimeMillis

Cas2DuoExternalAuthenticator.PersonAuthentication.currentTimeMillis

◆ duoExternalAuthenticator

Cas2DuoExternalAuthenticator.PersonAuthentication.duoExternalAuthenticator

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