コード例 #1
0
ファイル: ResourceOwner.cs プロジェクト: kokoar/OAuth2.Net
 internal static ResourceOwner FromXElement(XElement element)
 {
     var resourceOwner = new ResourceOwner(element.Element("name").Value);
     if(element.Element("guid") != null)
         resourceOwner.Guid = Guid.Parse(element.Element("guid").Value);
     return resourceOwner;
 }
コード例 #2
0
        internal static ResourceOwner FromXElement(XElement element)
        {
            var resourceOwner = new ResourceOwner(element.Element("name").Value);

            if (element.Element("guid") != null)
            {
                resourceOwner.Guid = Guid.Parse(element.Element("guid").Value);
            }
            return(resourceOwner);
        }
コード例 #3
0
        internal static Token GetToken(ServerWithAuthorizationCode server, ResourceOwner resourceOwner)
        {
            GetTokensInstance();
            var token =
                _tokens.FirstOrDefault(t => (t.Server.Guid == server.Guid && t.ResourceOwner.Name == resourceOwner.Name));

            if (token == null)
            {
                token = new Token(server, resourceOwner);
                _tokens.Add(token);
            }
            return(token);
        }
コード例 #4
0
 private void CmdResourceOwnerCreateClick(object sender, EventArgs e)
 {
     _resourceOwner = ResourceOwners.Add(txtResourceOwnerName.Text);
     lblResourceOwnerGUID.Text = _resourceOwner.Guid.ToString();
 }
コード例 #5
0
ファイル: Token.cs プロジェクト: kokoar/OAuth2.Net
 internal Token(Server server, ResourceOwner resourceOwner)
 {
     Server = server;
     ResourceOwner = resourceOwner;
 }
コード例 #6
0
 internal Token(Server server, ResourceOwner resourceOwner)
 {
     Server        = server;
     ResourceOwner = resourceOwner;
 }