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

公開メンバ関数

def __init__ (self, currentTimeMillis)
 
def init (self, configurationAttributes)
 
def destroy (self, configurationAttributes)
 
def getApiVersion (self)
 
def getRequiredClaims (self, context)
 
def authorize (self, context)
 
def getClaimsGatheringScriptName (self, context)
 
def prepareClientsSet (self, configurationAttributes)
 

公開変数類

 currentTimeMillis
 
 clientsSet
 

詳解

構築子と解体子

◆ __init__()

def UmaClientAuthzRptPolicy.UmaRptPolicy.__init__ (   self,
  currentTimeMillis 
)
20  def __init__(self, currentTimeMillis):
21  self.currentTimeMillis = currentTimeMillis
22 

関数詳解

◆ authorize()

def UmaClientAuthzRptPolicy.UmaRptPolicy.authorize (   self,
  context 
)
41  def authorize(self, context): # context is reference of org.xdi.oxauth.uma.authorization.UmaAuthorizationContext
42  print "RPT Policy. Authorizing ..."
43 
44  client_id=context.getClient().getClientId()
45  print "UmaRptPolicy. client_id = %s" % client_id
46 
47  if (StringHelper.isEmpty(client_id)):
48  return False
49 
50  if (self.clientsSet.contains(client_id)):
51  print "UmaRptPolicy. Authorizing client"
52  return True
53  else:
54  print "UmaRptPolicy. Client isn't authorized"
55  return False
56 

◆ destroy()

def UmaClientAuthzRptPolicy.UmaRptPolicy.destroy (   self,
  configurationAttributes 
)
29  def destroy(self, configurationAttributes):
30  print "RPT Policy. Destroyed successfully"
31  return True
32 

◆ getApiVersion()

def UmaClientAuthzRptPolicy.UmaRptPolicy.getApiVersion (   self)
33  def getApiVersion(self):
34  return 1
35 

◆ getClaimsGatheringScriptName()

def UmaClientAuthzRptPolicy.UmaRptPolicy.getClaimsGatheringScriptName (   self,
  context 
)
57  def getClaimsGatheringScriptName(self, context):
58  return ""
59 

◆ getRequiredClaims()

def UmaClientAuthzRptPolicy.UmaRptPolicy.getRequiredClaims (   self,
  context 
)
36  def getRequiredClaims(self, context):
37  json = """[
38  ]"""
39  return ClaimDefinitionBuilder.build(json)
40 

◆ init()

def UmaClientAuthzRptPolicy.UmaRptPolicy.init (   self,
  configurationAttributes 
)
23  def init(self, configurationAttributes):
24  print "RPT Policy. Initializing ..."
25  self.clientsSet = self.prepareClientsSet(configurationAttributes)
26  print "RPT Policy. Initialized successfully"
27  return True
28 

◆ prepareClientsSet()

def UmaClientAuthzRptPolicy.UmaRptPolicy.prepareClientsSet (   self,
  configurationAttributes 
)
60  def prepareClientsSet(self, configurationAttributes):
61  clientsSet = HashSet()
62  if (not configurationAttributes.containsKey("allowed_clients")):
63  return clientsSet
64 
65  allowedClientsList = configurationAttributes.get("allowed_clients").getValue2()
66  if (StringHelper.isEmpty(allowedClientsList)):
67  print "UmaRptPolicy. The property allowed_clients is empty"
68  return clientsSet
69 
70  allowedClientsListArray = StringHelper.split(allowedClientsList, ",")
71  if (ArrayHelper.isEmpty(allowedClientsListArray)):
72  print "UmaRptPolicy. No clients specified in allowed_clients property"
73  return clientsSet
74 
75  # Convert to HashSet to quick search
76  i = 0
77  count = len(allowedClientsListArray)
78  while (i < count):
79  client = allowedClientsListArray[i]
80  clientsSet.add(client)
81  i = i + 1
82 
83  return clientsSet
84 

メンバ詳解

◆ clientsSet

UmaClientAuthzRptPolicy.UmaRptPolicy.clientsSet

◆ currentTimeMillis

UmaClientAuthzRptPolicy.UmaRptPolicy.currentTimeMillis

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