Example #1
0
 def get(self, name):
     cl = Client()
     cl.name = name
     cl.secret = hex_sha1.encrypt(cl.name)
     cl._type = "public"
     cl.redirect_uris.append(unicode(url_for('dashboard.index', _external=True)))
     [cl.default_scopes.append(unicode(scope)) for scope in config.OAUTH_SCOPES]
     cl.save()
     return render_template("index.html", client=Client)
Example #2
0
 def get(self, name):
     cl = Client()
     cl.name = name
     cl.secret = hex_sha1.encrypt(cl.name)
     cl._type = "public"
     cl.redirect_uris.append(unicode(url_for('dashboard.index', _external=True)))
     [cl.default_scopes.append(unicode(scope)) for scope in config.OAUTH_SCOPES]
     cl.save()
     return render_template("index.html", client=Client)
Example #3
0
 def sha1(self, plain):
     return hex_sha1.encrypt(plain)
Example #4
0
 def sha1(self, plain):
     return hex_sha1.encrypt(plain)