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