1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.springframework.security.oauth.examples.tonr.converter;
16
17 import java.util.Arrays;
18 import java.util.HashSet;
19 import java.util.Set;
20
21 import org.springframework.core.convert.TypeDescriptor;
22 import org.springframework.core.convert.converter.GenericConverter;
23 import org.springframework.security.oauth2.client.token.AccessTokenRequest;
24
25
26
27
28
29 public class AccessTokenRequestConverter implements GenericConverter {
30
31 private Set<ConvertiblePair> convertibleTypes = new HashSet<GenericConverter.ConvertiblePair>(
32 Arrays.asList(new ConvertiblePair(AccessTokenRequest.class, AccessTokenRequest.class)));
33
34 public Set<ConvertiblePair> getConvertibleTypes() {
35 return convertibleTypes;
36 }
37
38 public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
39 return source;
40 }
41
42 }