Get access_token from header correctly
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
# Operations Guide
|
||||
- [Overview](#overview)
|
||||
- [Maintenance](#maintenance)
|
||||
- [Backuo](#backup)
|
||||
- [Operations Guide](#operations-guide)
|
||||
- [Overview](#overview)
|
||||
- [Maintenance](#maintenance)
|
||||
- [Backup](#backup)
|
||||
- [Run](#run)
|
||||
- [Restore](#restore)
|
||||
|
||||
## Overview
|
||||
This document gives various information for the day-to-day management and operations of ma1sd.
|
||||
|
@@ -29,10 +29,7 @@ import java.util.Optional;
|
||||
public abstract class ApplicationServiceHandler extends BasicHttpHandler {
|
||||
|
||||
protected String getToken(HttpServerExchange ex) {
|
||||
return Optional.ofNullable(ex.getQueryParameters()
|
||||
.getOrDefault("access_token", new LinkedList<>())
|
||||
.peekFirst()
|
||||
).orElse("");
|
||||
return getAccessToken(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user