From f0f339d45f5969cce903431eedbe73f2af940da5 Mon Sep 17 00:00:00 2001 From: Amanda Anganes Date: Mon, 16 Apr 2012 11:05:36 -0400 Subject: [PATCH] current state --- .../token/JdbcUserApprovalHandler.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 openid-connect-server/src/main/java/org/mitre/openid/connect/token/JdbcUserApprovalHandler.java diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/token/JdbcUserApprovalHandler.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/token/JdbcUserApprovalHandler.java new file mode 100644 index 000000000..c3ce9474a --- /dev/null +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/token/JdbcUserApprovalHandler.java @@ -0,0 +1,20 @@ +package org.mitre.openid.connect.token; + +import org.springframework.security.core.Authentication; +import org.springframework.security.oauth2.provider.AuthorizationRequest; +import org.springframework.security.oauth2.provider.approval.UserApprovalHandler; + +public class JdbcUserApprovalHandler implements UserApprovalHandler { + + @Override + public boolean isApproved(AuthorizationRequest authorizationRequest, + Authentication userAuthentication) { + + //Check database to see if the user identified by the userAuthentication has stored an approval decision + userAuthentication.getPrincipal(); + + + return false; + } + +}