| | |
| | | import com.sun.net.httpserver.HttpExchange; |
| | | import com.sun.net.httpserver.HttpPrincipal; |
| | | import de.uhilger.httpserver.auth.realm.Realm; |
| | | import de.uhilger.httpserver.base.handler.HttpResponder; |
| | | import de.uhilger.httpserver.base.HttpResponder; |
| | | import io.jsonwebtoken.Claims; |
| | | import io.jsonwebtoken.JwtException; |
| | | import io.jsonwebtoken.Jwts; |
| | |
| | | this.realm = realm; |
| | | } |
| | | |
| | | //public Realm getRealm() { |
| | | // return realm; |
| | | //} |
| | | |
| | | public boolean hasRole(String userId, String roleId) { |
| | | return realm.hasRole(userId, roleId); |
| | | } |
| | | |
| | | public void setWWWAuthRealm(String wwwAuthRealm) { |
| | | this.wwwAuthRealm = wwwAuthRealm; |
| | | } |