Files
matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/TokenResponse.java

21 lines
538 B
Java

package com.cygnus.cloud.security;
import java.util.LinkedHashMap;
import java.util.Map;
record TokenResponse(
String accessToken,
String tokenType,
long expiresIn,
String scope) {
Map<String, Object> asOAuthResponse() {
Map<String, Object> response = new LinkedHashMap<>();
response.put("access_token", accessToken);
response.put("token_type", tokenType);
response.put("expires_in", expiresIn);
response.put("scope", scope);
return response;
}
}