### 登錄驗證
keycloak_openid = KeycloakOpenID(
server_url="",
client_id="",
realm_name="",
client_secret_key="",
verify=False, )
try:
token = keycloak_openid.token(username, password)
print('token',token)
access_token = token['access_token']
userinfo = keycloak_openid.userinfo(token['access_token'])
print('userinfo',userinfo)
except Exception as e:
# return render(request,'user_login.html',{'error':'username and passwd error.'})
pass