Spring Security Oauth2:RedisTokenStore之Token內容


想要定制序列化的同學請參考上一篇文章

https://www.cnblogs.com/meow-world/articles/15192758.html

這一篇主要貼一些token實際內容,具體含義請參考其他博文

https://blog.csdn.net/liuyanglglg/article/details/89077855

access

  access:c6fceba3-f3ad-48c8-81a0-4411e904db39

{
    @type:"org.springframework.security.oauth2.common.DefaultOAuth2AccessToken"
    additionalInformation:{
        @type:"java.util.Collections$EmptyMap"
    }
    expiration:1630033159634
    expired:false
    expiresIn:3600
    refreshToken:{
        @type:"org.springframework.security.oauth2.common.DefaultExpiringOAuth2RefreshToken"
        expiration:1630094359338
        value:"29448a58-1ed9-4033-84e6-8fd0e721afba"
    }
    scope:[
    "all"
    ]
    tokenType:"bearer"
    value:"c6fceba3-f3ad-48c8-81a0-4411e904db39"
}

2.access_to_refresh

  access_to_refresh:c6fceba3-f3ad-48c8-81a0-4411e904db39

29448a58-1ed9-4033-84e6-8fd0e721afba

3.auth

  auth:c6fceba3-f3ad-48c8-81a0-4411e904db39

{    
    "@type":"org.springframework.security.oauth2.provider.OAuth2Authentication",
    "authenticated":true,"authorities":[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"common"}],
    "clientOnly":false,
    "credentials":"",
    "name":"200135",
    "oAuth2Request":{
        "approved":true,
        "authorities":Set[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"All"}],
        "clientId":"c1",
        "extensions":{"@type":"java.util.HashMap"},
        "grantType":"authorization_code",
        "redirectUri":"http://www.ai-test.com/login/oauth2/code/login-client",
        "refresh":true,
        "refreshTokenRequest":{
            "clientId":"c1",
            "grantType":"refresh_token",
            "requestParameters":{
                "@type":"java.util.Collections$UnmodifiableMap",
                "refresh_token":"29448a58-1ed9-4033-84e6-8fd0e721afba",
                "grant_type":"refresh_token",
                "scope":"all",
                "product_id":"900101",
                "client_secret":"secret",
                "client_id":"c1"
            },
            "scope":["all"]
        },
        "requestParameters":{
            "@type":"java.util.Collections$UnmodifiableMap",
            "code":"1fgMMf",
            "grant_type":"authorization_code",
            "scope":"all",
            "response_type":"code",
            "state":"U-clV-6HOCKKaf19IT11Xc7Z2hAr3kkrR7izvBTf_Sc=",
            "redirect_uri":"http://www.ai-test.com/login/oauth2/code/login-client",
            "client_id":"c1"
        },
        "resourceIds":Set[],
        "responseTypes":Set["code"],
        "scope":["all"]
    },
    "principal":{
        "@type":"com.aicloud.common.core.entity.BaseUser",
        "accountNonExpired":true,
        "accountNonLocked":true,
        "aicloudId":200135,
        "authorities":Set[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"common"}],
        "credentialsNonExpired":true,
        "enabled":true,
        "loginProductId":900101,
        "password":"{bcrypt}$2a$10$y9LpDpQ5gd.7MT5PiuyD6Oqct2P7lqwJCDDffe",
        "productId":900101,"username":"200135"
    },
    "userAuthentication":{
        "@type":"org.springframework.security.authentication.UsernamePasswordAuthenticationToken",
        "authenticated":true,
        "authorities":[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"common"}],
        "name":"200135",
        "principal":{
            "@type":"com.aicloud.common.core.entity.BaseUser",
            "accountNonExpired":true,
            "accountNonLocked":true,
            "aicloudId":200135,
            "authorities":Set[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"common"}],
            "credentialsNonExpired":true,
            "enabled":true,
            "loginProductId":900101,
            "password":"{bcrypt}$2a$10$y9LpDpQ5gd.7MT5PiuyD6Oqct2P7lqwJ9CDDffe",
            "productId":900101,"username":"200135"
        }
    }
}

 

4.auth_to_access

  auth_to_access:384e55b3eddd76bebe60c9ca1e8d1a3b

{
    @type:"org.springframework.security.oauth2.common.DefaultOAuth2AccessToken"
    additionalInformation:{
        @type:"java.util.Collections$EmptyMap"
    }
    expiration:1630033159634
    expired:false
    expiresIn:3600
    refreshToken:{
        @type:"org.springframework.security.oauth2.common.DefaultExpiringOAuth2RefreshToken"
        expiration:1630094359338
        value:"29448a58-1ed9-4033-84e6-8fd0e721afba"
    }
    scope:[
        "all"
    ]
    tokenType:"bearer"
    value:"c6fceba3-f3ad-48c8-81a0-4411e904db39"
}

 

5.refresh

  refresh:29448a58-1ed9-4033-84e6-8fd0e721afba

{
    @type:"org.springframework.security.oauth2.common.DefaultExpiringOAuth2RefreshToken"
    expiration:1630094359338
    value:"29448a58-1ed9-4033-84e6-8fd0e721afba"
}

 

6.refresh_auth

  refresh_auth:29448a58-1ed9-4033-84e6-8fd0e721afba

{    
    "@type":"org.springframework.security.oauth2.provider.OAuth2Authentication",
    "authenticated":true,"authorities":[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"common"}],
    "clientOnly":false,
    "credentials":"",
    "name":"200135",
    "oAuth2Request":{
        "approved":true,
        "authorities":Set[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"All"}],
        "clientId":"c1",
        "extensions":{
            "@type":"java.util.HashMap"
        },
        "grantType":"authorization_code",
        "redirectUri":"http://www.aicloud-test.com/login/oauth2/code/login-client",
        "refresh":false,
        "requestParameters":{
            "@type":"java.util.Collections$UnmodifiableMap",
            "code":"1fgMMf",
            "grant_type":"authorization_code",
            "scope":"all",
            "response_type":"code",
            "state":"U-clV-6HOCKKaf19IT11Xc7Z2hAr3kkrR7izvBTf_Sc=",
            "redirect_uri":"http://www.aicloud-test.com/login/oauth2/code/login-client",
            "client_id":"c1"},"resourceIds":Set[],"responseTypes":Set["code"],"scope":["all"]
    },
    "principal":{
        "@type":"com.aicloud.common.core.entity.BaseUser",
        "accountNonExpired":true,"accountNonLocked":true,
        "aicloudId":200135,
        "authorities":Set[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"common"}],
        "credentialsNonExpired":true,"enabled":true,"loginProductId":900101,
        "password":"{bcrypt}$2a$10$y9LpDpQ5gd.7MT5PiuyD6Oqct2P7lqwJux7JwE374NjKX29CDDffe",
        "productId":900101,"username":"200135"
    },
    "userAuthentication":{
        "@type":"org.springframework.security.authentication.UsernamePasswordAuthenticationToken",
        "authenticated":true,
        "authorities":[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"common"}],
        "details":{"@type":"org.springframework.security.web.authentication.WebAuthenticationDetails",
        "remoteAddress":"10.0.3.101","sessionId":"0898b3df-c9ea-43ed-b250-409c396c40d9"},"name":"200135",
        "principal":{
            "@type":"com.aicloud.common.core.entity.BaseUser","accountNonExpired":true,"accountNonLocked":true,"aicloudId":200135,
            "authorities":Set[{"@type":"org.springframework.security.core.authority.SimpleGrantedAuthority","authority":"common"}],
            "credentialsNonExpired":true,"enabled":true,"loginProductId":900101,
            "password":"{bcrypt}$2a$10$y9LpDpQ5gd.7MT5PiuyD6Oqct2P7lqwJux7JwE374NjKX29CDDffe","productId":900101,"username":"200135"
        }
    }
}

 

7.refresh_to_access

  refresh_to_access:29448a58-1ed9-4033-84e6-8fd0e721afba

c6fceba3-f3ad-48c8-81a0-4411e904db39

 

8.client_id_to_access

  refresh_to_access:29448a58-1ed9-4033-84e6-8fd0e721afba

c6fceba3-f3ad-48c8-81a0-4411e904db39

 

9.username_to_access

  refresh_to_access:29448a58-1ed9-4033-84e6-8fd0e721afba

c6fceba3-f3ad-48c8-81a0-4411e904db39

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM