Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package org.dropwizard.auth.core;
  2.  
  3. import io.dropwizard.auth.Authorizer;
  4.  
  5. public class DropwizardAuthorizer implements Authorizer<User> {
  6.     private static final String ADMIN = "ADMIN";
  7.     private static final String TEST_NAME = "testName";
  8.  
  9.     public boolean authorize(User user, String role) {
  10.         return user.getName().equals(TEST_NAME) && role.equals(ADMIN);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement