forked from kidgrow-microservices-platform

zxh
2020-08-20 f5416d4f90125564a4e2281c011e6001fd5842bd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Êþº¾4
8›œ
ž
6Ÿ 
¡¢£
    ¤¥
¦§
©ª«    ¬­ ®¯S
±    6² ³´
µ¶ ·¸¹
º    6» ¼½
¾    6¿
ÀÁÂÃ
6ÄÅ
6Æ    6ÇÈ ÉÊ
#Ë    ÌÍ
ÌÎ ÏÐ
ÀÑ    6Ò ÓÔÕÖ
/¡    6× ®Ø ÙÚÛÜ
ÝÞßlogLorg/slf4j/Logger; objectMapper-Lcom/fasterxml/jackson/databind/ObjectMapper;RuntimeVisibleAnnotationsLjavax/annotation/Resource;passwordEncoder>Lorg/springframework/security/crypto/password/PasswordEncoder;8Lorg/springframework/beans/factory/annotation/Autowired; authorizationServerTokenServicesULorg/springframework/security/oauth2/provider/token/AuthorizationServerTokenServices;authenticationManagerCLorg/springframework/security/authentication/AuthenticationManager;clientDetailsServiceCLorg/springframework/security/oauth2/provider/ClientDetailsService;<init>()VCodeLineNumberTableLocalVariableTablethis0Lcom/kidgrow/oauth2/controller/OAuth2Controller;getUserTokenInfov(Ljava/lang/String;Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)VusernameLjava/lang/String;passwordrequest'Ljavax/servlet/http/HttpServletRequest;response(Ljavax/servlet/http/HttpServletResponse;tokenQLorg/springframework/security/authentication/UsernamePasswordAuthenticationToken;
Exceptionsà%Lio/swagger/annotations/ApiOperation;value用户名密码获取token5Lorg/springframework/web/bind/annotation/PostMapping;/oauth/user/token"RuntimeVisibleParameterAnnotations!Lio/swagger/annotations/ApiParam;requiredname账号密码getTokenByOpenIdd(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)VopenId8Lcom/kidgrow/authclient/token/OpenIdAuthenticationToken;openId获取token/oauth/openId/tokengetTokenByMobilemobile8Lcom/kidgrow/authclient/token/MobileAuthenticationToken;mobile获取token/oauth/mobile/token writerToken­(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframework/security/authentication/AbstractAuthenticationToken;Ljava/lang/String;)V clientInfos[Ljava/lang/String;clientId clientSecret clientDetails<Lorg/springframework/security/oauth2/provider/ClientDetails; tokenRequest;Lorg/springframework/security/oauth2/provider/TokenRequest; oAuth2Request<Lorg/springframework/security/oauth2/provider/OAuth2Request;authentication2Lorg/springframework/security/core/Authentication;oAuth2AuthenticationCLorg/springframework/security/oauth2/provider/OAuth2Authentication;oAuth2AccessToken>Lorg/springframework/security/oauth2/common/OAuth2AccessToken;e;Lorg/springframework/security/core/AuthenticationException;Ljava/lang/Exception;ILorg/springframework/security/authentication/AbstractAuthenticationToken;badCredenbtialsMsg StackMapTableáÅexceptionHandler@(Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Exception;)V=(Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;)Vmsg    getClientb(Ljava/lang/String;Ljava/lang/String;)Lorg/springframework/security/oauth2/provider/ClientDetails;â<clinit>
SourceFileOAuth2Controller.javaLio/swagger/annotations/Api;tagsOAuth2相关操作8Lorg/springframework/web/bind/annotation/RestController; HIOorg/springframework/security/authentication/UsernamePasswordAuthenticationToken Hã用户名或密码错误 st6com/kidgrow/authclient/token/OpenIdAuthenticationToken Hä openId错误6com/kidgrow/authclient/token/MobileAuthenticationToken Hå手机号或密码错误æ çè ‘’é êä9org/springframework/security/oauth2/provider/TokenRequestë ìíâ îï Hð ñò DEó ôõö ÷øù úûAorg/springframework/security/oauth2/provider/OAuth2Authentication Hü BCý þÿ  ;< Corg/springframework/security/authentication/BadCredentialsExceptionRorg/springframework/security/authentication/InternalAuthenticationServiceException java/lang/Exception Ž 9:exceptionHandler-error:      
  ]    FG ]org/springframework/security/oauth2/common/exceptions/UnapprovedClientAuthenticationException clientId对应的信息不存在 ?@      clientSecret不匹配.com/kidgrow/oauth2/controller/OAuth2Controller java/lang/Objectjava/io/IOException9org/springframework/security/core/AuthenticationException:org/springframework/security/oauth2/provider/ClientDetails'(Ljava/lang/Object;Ljava/lang/Object;)V(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)V%com/kidgrow/authclient/util/AuthUtils extractClient<(Ljavax/servlet/http/HttpServletRequest;)[Ljava/lang/String;.com/kidgrow/common/context/ClientContextHolder    setClient(org/apache/commons/collections4/MapUtilsEMPTY_SORTED_MAPLjava/util/SortedMap;getScope()Ljava/util/Set;L(Ljava/util/Map;Ljava/lang/String;Ljava/util/Collection;Ljava/lang/String;)VcreateOAuth2Requestz(Lorg/springframework/security/oauth2/provider/ClientDetails;)Lorg/springframework/security/oauth2/provider/OAuth2Request;Aorg/springframework/security/authentication/AuthenticationManager authenticatef(Lorg/springframework/security/core/Authentication;)Lorg/springframework/security/core/Authentication;?org/springframework/security/core/context/SecurityContextHolder
getContext=()Lorg/springframework/security/core/context/SecurityContext;9org/springframework/security/core/context/SecurityContextsetAuthentication5(Lorg/springframework/security/core/Authentication;)Vq(Lorg/springframework/security/oauth2/provider/OAuth2Request;Lorg/springframework/security/core/Authentication;)VSorg/springframework/security/oauth2/provider/token/AuthorizationServerTokenServicescreateAccessTokenƒ(Lorg/springframework/security/oauth2/provider/OAuth2Authentication;)Lorg/springframework/security/oauth2/common/OAuth2AccessToken;setAuthenticated(Z)V%com/kidgrow/common/utils/ResponseUtilresponseSucceedj(Lcom/fasterxml/jackson/databind/ObjectMapper;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Object;)Vorg/slf4j/Loggererror*(Ljava/lang/String;Ljava/lang/Throwable;)V
getMessage()Ljava/lang/String;#org/springframework/http/HttpStatus UNAUTHORIZED%Lorg/springframework/http/HttpStatus;()I&javax/servlet/http/HttpServletResponse    setStatus(I)VresponseFailedj(Lcom/fasterxml/jackson/databind/ObjectMapper;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;)VAorg/springframework/security/oauth2/provider/ClientDetailsServiceloadClientByClientIdP(Ljava/lang/String;)Lorg/springframework/security/oauth2/provider/ClientDetails;getClientSecret<org/springframework/security/crypto/password/PasswordEncodermatches-(Ljava/lang/CharSequence;Ljava/lang/String;)Zorg/slf4j/LoggerFactory    getLogger%(Ljava/lang/Class;)Lorg/slf4j/Logger;!689:;<=>?@=ABC=>DE=AFG=A    HIJ/*·±K,L MNOPJ{»Y+,·:*-·±KB CDL>MNQRSRTUVW XYZ[=\]s^_][s`a/bcZdesQ]sfbcZdesS]sghiJo»Y+·:*,-·±KK
LML4MNjRTUVW
XkZ[=\]sl_][smabcZdesj]sjnPJ{»    Y+,·
:*- ·±KU VWL>MNoRSRTUVW XpZ[=\]sq_][sra/bcZdeso]sobcZdesS]sgstJÑš+¸ :2:2:*· :¸»Y²¹·:        ¶:
*´-¹: ¸ ¹»Y
 ·: *´ ¹:  ¶*´, ¸§:*,·"§ :*,·$±„ „!#KR\] ^_l!m8nAoMpWqdrqswty„u†vyw’x™zL¢{uv uwRoxReyz8I{|    A@}~
M4€ d‚ qƒ„ †…†’…‡šMNšTUšVWšXˆš‰RŠ ÷„‹KŒZ[ŽJ[²%&,¹'*+,¶(·"±K} ~L MNVW…‡Z[J\+²)¶*¹+*´+,¸,±K‚ ƒ„L MNVWRZ[‘’J£8*´-+¹.N-Ç »/Y0·1¿*´2,-¹3¹4š »/Y5·1¿-°K‡ ‰Š‹,Œ6ŽL*8MN8wR8xR -yzŠ    ü“”IJ!    6¸7³%±K*•–=—˜[s™š