예제 #1
0
 public static bool CanHandlePostLogout(this IdentityServer.Store.Entity.Client client)
 {
     return(client.AllowedGrantTypes.Any(g => g.GrantType == "authorization_code" ||
                                         g.GrantType == "hybrid" ||
                                         g.GrantType == "implicit") ||
            client.HasCustomGrantType());
 }
예제 #2
0
 public static bool CanUseRefreshToken(this IdentityServer.Store.Entity.Client client)
 {
     return((client.AllowedGrantTypes.Any(g => g.GrantType == "authorization_code" ||
                                          g.GrantType == "hybrid" ||
                                          g.GrantType == "password") ||
             client.HasCustomGrantType()) &&
            client.AllowOfflineAccess);
 }
예제 #3
0
 public static bool IsWebClient(this IdentityServer.Store.Entity.Client client)
 {
     return(client.ProtocolType == "wsfed" ||
            client.AllowedGrantTypes.Any(g => g.GrantType == "authorization_code" ||
                                         g.GrantType == "hybrid" ||
                                         g.GrantType == "implicit" ||
                                         g.GrantType == "urn:ietf:params:oauth:grant-type:device_code") ||
            client.HasCustomGrantType());
 }
예제 #4
0
 public static bool IsDevice(this IdentityServer.Store.Entity.Client client)
 {
     return(client.AllowedGrantTypes.Any(g => g.GrantType == "urn:ietf:params:oauth:grant-type:device_code") ||
            client.HasCustomGrantType());
 }
예제 #5
0
 public static bool IsAuthorizationCodeClient(this IdentityServer.Store.Entity.Client client)
 {
     return(client.AllowedGrantTypes.Any(g => g.GrantType == "authorization_code") ||
            client.HasCustomGrantType());
 }