br.com.anteros.security.spring.oauth2.AnterosSecurityApprovalStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Anteros-Security-Spring Show documentation
Show all versions of Anteros-Security-Spring Show documentation
Anteros Security Spring for Java.
package br.com.anteros.security.spring.oauth2;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.oauth2.provider.approval.Approval;
import org.springframework.security.oauth2.provider.approval.ApprovalStore;
import org.springframework.stereotype.Component;
import br.com.anteros.security.store.SecurityDataStore;
@Component("approvalStore")
public class AnterosSecurityApprovalStore implements ApprovalStore {
@Autowired
private SecurityDataStore securityDataStore;
public boolean addApprovals(Collection approvals) {
securityDataStore.addApprovals(approvals);
return true;
}
public boolean revokeApprovals(Collection approvals) {
securityDataStore.revokeApprovals(approvals);
return true;
}
public Collection getApprovals(String userId, String clientId) {
return securityDataStore.getApprovals(userId,clientId);
}
}