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

公開変数類

 currentTimeMillis
 

詳解

構築子と解体子

◆ __init__()

def UmaRptPolicy.UmaRptPolicy.__init__ (   self,
  currentTimeMillis 
)
22  def __init__(self, currentTimeMillis):
23  self.currentTimeMillis = currentTimeMillis
24 

関数詳解

◆ authorize()

def UmaRptPolicy.UmaRptPolicy.authorize (   self,
  context 
)
64  def authorize(self, context): # context is reference of org.xdi.oxauth.uma.authorization.UmaAuthorizationContext
65  print "RPT Policy. Authorizing ..."
66 
67  if context.getClaim("country") == 'US' and context.getClaim("city") == 'NY':
68  print "Authorized successfully!"
69  return True
70 
71  return False
72 

◆ destroy()

def UmaRptPolicy.UmaRptPolicy.destroy (   self,
  configurationAttributes 
)
31  def destroy(self, configurationAttributes):
32  print "RPT Policy. Destroying ..."
33  print "RPT Policy. Destroyed successfully"
34  return True
35 

◆ getApiVersion()

def UmaRptPolicy.UmaRptPolicy.getApiVersion (   self)
36  def getApiVersion(self):
37  return 1
38 

◆ getClaimsGatheringScriptName()

def UmaRptPolicy.UmaRptPolicy.getClaimsGatheringScriptName (   self,
  context 
)
74  def getClaimsGatheringScriptName(self, context): # context is reference of org.xdi.oxauth.uma.authorization.UmaAuthorizationContext
75  context.addRedirectUserParam("customUserParam2", "value2") # pass some custom parameters to need_info uri. It can be removed if you don't need custom parameters.
76  return "sampleClaimsGathering"

◆ getRequiredClaims()

def UmaRptPolicy.UmaRptPolicy.getRequiredClaims (   self,
  context 
)
43  def getRequiredClaims(self, context): # context is reference of org.xdi.oxauth.uma.authorization.UmaAuthorizationContext
44  json = """[
45  {
46  "issuer" : [ "%1$s" ],
47  "name" : "country",
48  "claim_token_format" : [ "http://openid.net/specs/openid-connect-core-1_0.html#IDToken" ],
49  "claim_type" : "string",
50  "friendly_name" : "country"
51  },
52  {
53  "issuer" : [ "%1$s" ],
54  "name" : "city",
55  "claim_token_format" : [ "http://openid.net/specs/openid-connect-core-1_0.html#IDToken" ],
56  "claim_type" : "string",
57  "friendly_name" : "city"
58  }
59  ]"""
60  context.addRedirectUserParam("customUserParam1", "value1") # pass some custom parameters to need_info uri. It can be removed if you don't need custom parameters.
61  return ClaimDefinitionBuilder.build(String.format(json, context.getIssuer()))
62 

◆ init()

def UmaRptPolicy.UmaRptPolicy.init (   self,
  configurationAttributes 
)
25  def init(self, configurationAttributes):
26  print "RPT Policy. Initializing ..."
27  print "RPT Policy. Initialized successfully"
28 
29  return True
30 

メンバ詳解

◆ currentTimeMillis

UmaRptPolicy.UmaRptPolicy.currentTimeMillis

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