首页>代码>Spring Boot整合Java开源OAuth库ScribeJava实现第三方用户登录授权实例,支持QQ,微信,微博等平台>/scribejava-oauth2/src/main/java/com/hellokoding/springboot/oauth2/OAuth2Properties.java
package com.hellokoding.springboot.oauth2;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
@ConfigurationProperties(prefix = "oauth2.client")
@Getter
public class OAuth2Properties {
    private final Map<String, Registration> registration = new HashMap<>();
    private final Map<String, Provider> provider = new HashMap<>();

    @Getter @Setter
    public static class Registration {
        private String clientId;
        private String clientSecret;
        private String redirectUri;
        private String scope;
        private String authorizationGrantType = "code";
    }

    @Getter @Setter
    public static class Provider {
        private String name;
        private String authorizationUri;
        private String tokenUri;
        private String userInfoUri;
        private String revokeTokenUri;
        private String revokePermissionUri;
        private String userNameAttribute = "name";
    }
}
最近下载更多
dfsyke  LV13 2020年11月1日
醉心客  LV5 2020年10月23日
最代码官方  LV168 2020年10月23日
最近浏览更多
sjwc88  LV4 2024年12月15日
15578157792  LV7 2024年12月6日
哪里的完整版  LV8 2024年9月20日
dapeng0011  LV15 2024年8月25日
唐僧洗头爱飘柔  LV22 2024年6月21日
叁卍石  LV5 2024年3月20日
kaye7549317 2024年1月16日
暂无贡献等级
mukoooo  LV2 2023年12月5日
hhsoft  LV1 2023年10月22日
601601lmy  LV5 2023年7月12日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友